A set of fancy tools for django.
Project description
Set of libraries used for the gipsy project.
Install
It is strongly recommanded to install this theme from GIT with PIP onto you project virtualenv.
From PyPi
pip install django-gipsy
From Github
https://github.com/RevSquare/gipsy#egg=gipsy
GISPY TOOLBAR
This Django app manages a toolbar for admins with shortcuts to easily navigate to most relevant admin features.
setup
Simply add the app in your installed apps list in settings.py
INSTALLED_APPS = (
...
'gipsy.toolbar'
...
)
Then install your model with
python manage.py syncdb
In case you are using South, you can alternatively do:
python manage.py migrate gipsy.toolbar
Setup your menu items in the admin.
And finaly, install the toolbar in your templates with a template tag:
{% load gipsy_toolbar %}
{% gipsy_toolbar %}
For the admin part, you will need to overwrite templates with the same code as above: {templates}/admin/base.html
If you are using a cache engine such as Varnish, you can use a bundled middleware in order to set a cookie that you can use to deactivate cache to display the toolkbar for staff admins. Happy to hear abotu a cleaner solution.
MIDDLEWARE_CLASSES = (
...
'gipsy.toolbar.middleware.GipsyToolbarMiddleware',
...
)
GISPY DASHBOARD
This Django app adds tons of cool features in the django admin. For now it works only with grappelli, so make sure you have it installed.
setup
Simply add the app in your installed apps list in settings.py.
IMPORTANT! You need to install it BEFORE any other admin library such as grappelli or django admin.
INSTALLED_APPS = (
'gipsy.dashboard',
...
'grappelli',
...
'django.contrib.admin',
)
Then install your model with
python manage.py syncdb
In case you are using South, you can alternatively do:
python manage.py migrate gipsy.dashboard
Urls
By default Gipsy Dashboard overrides the admin urls to display the dashboard as the default admin homepage. It still keeps the default index of django or grappelli by hosts this page on a different url: ‘admin:all_tables’
To do so, Gipsy Dashboard overrides the django.contrib.admin.sites.AdminSite. If you are using your own AdminSite class, you can inherit it from the gispy.dashboard.admin.GipsyAdminSite. You can also remove this behaviour by using the following constant in your settings:
GIPSY_ENABLE_ADMINSITE = False
You will then need to use your own url redirections and settings.
Additionnaly you can define in the settings the url pattern you want to use for each of those pages:
GIPSY_DASHBOARD_URL = 'admin:index'
GIPSY_VANILLA_INDEX_URL = 'admin:all_apps'
Widgets
The philosophy behind the widget is flexibility. Gipsy Dashboard integrate a set of pre-written template tags. You can include those template tags by overwriting the gipsy.dashboard.templates.dashboard.html file.
Then feel free to add you own widgets by copying the html of each templatetags. Or you can use existing templatetags and fill them with appropriate objects.
Please feel free to contribute. Any help and advices are much appreciated.
LINKS
- Development:
- Package:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-gipsy-0.0.1.tar.gz
.
File metadata
- Download URL: django-gipsy-0.0.1.tar.gz
- Upload date:
- Size: 695.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4104e4abfa5f3a490c8ef6991d304fb52348f0214f4004966cf4a53d9d568f6 |
|
MD5 | 2072c764aa9fa0bf6fab6ce8653d2849 |
|
BLAKE2b-256 | 80ac97c364e3673d35a1305ed4fcc123a8a855145d7b9353b3ec6d997dcf4b94 |