Git Product home page Git Product logo

osm-jet's Introduction

OSM Jet

License: AGPL v3

This is the Django admin and Jet overrides used by the Onespacemedia team.

Requirements

OSM Jet currently requires the following pip packages:

Package Version PyPy page Repo
Django 1.11.x+ https://pypi.org/project/Django/ https://github.com/django/django
Django Jet 1.0.8 https://pypi.org/project/django-jet/ https://github.com/geex-arts/django-jet

In addition, the Onespacemedia CMS is required if you want to use the sitemap dashboard module.

Installation

Install osm_jet

pip install osm_jet

Add osm_jet to your project's installed apps. If you're using the Onespacemedia CMS, ensure osm_jet is before cms:

INSTALLED_APPS = [
    ...
    'osm_jet',
    ...
]

Add the following settings to your settings/base.py:

JET_CHANGE_FORM_SIBLING_LINKS = False  # Hide the next and previous object arrows
JET_DEFAULT_THEME = 'osm'              # Sets the theme to be OSM and doesn't show theme selector
JET_WIDGET_SELECTOR = False            # Hides the widget selector.

Usage

osm_jet provides wrappers and extensions for some of the default Django and Jet classes. These are:

Admin wrappers

  • osm_jet.admin.JetTabularInline - A wrapper for the default Django TabularInline class that fixes some Jet issues.
  • osm_jet.admin.JetStackedInline - A wrapper for the default Django StackedInline class that fixes some Jet issues.
  • osm_jet.admin.JetCompactInline - A wrapper for the Jet CompactInline that fixes some issues and also adds re-ordering functionality.

Fields

  • osm_jet.fields.DjangoManyToMany - Brings back the default Django style of ManyToMany widgets if you're not a fan of Jet's select2 version.
  • Fixes and style overrides for Jazzband's sortedM2M
  • osm_jet.fields.JetSortedManyToManyField - An alternate version of Jazzband's sortedM2M which adds inline editing to objects in the field.

Dashboard

  • osm_jet.dashboard.Dashboard - This should only be used if you're also using the Onespacemedia CMS. This adds the sitemap module to the dashboard. For more information on usage, see the Jet docs on creating custom Dashboards.

Template overrides

In addition to the above, osm_jet overrides multiple Django and Jet templates to improve their styling and layout. It also provides some utility templates you can use the customise the admin. These are:

  • templates/admin/nav_links.html - For adding links to the top of your sidebar on all admin pages.
  • templates/admin/sharing_links.html - For adding buttons to share any object from its change form.
  • templates/admin/body_top.html - For adding content to the top of every admin page's body.
  • templates/admin/body_bottom.html - For adding content to the bottom of every admin page's body.

osm-jet's People

Contributors

aidancurrah avatar daniel-clayton avatar bensebabillal avatar lewiscollard avatar joe-hastings avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.