Django-mptt-admin provides a nice Django Admin interface for Mptt models
Project description
Django-mptt-admin provides a nice Django Admin interface for django-mptt models. The source is available on https://github.com/mbraak/django-mptt-admin. It uses the jqTree library.
Requirements
The package is tested with Django (1.8 - 1.10), and django-mptt (0.7.x and higher). Also with Python 2.7, 3.3-3.5.
Note that version 0.3.8 also supports Django 1.7.
Installation
Install the package:
$ pip install django_mptt_admin
Add django_mptt_admin to your installed apps in settings.py.
INSTALLED_APPS = (
..
'django_mptt_admin',
)
Use the DjangoMpttAdmin class in admin.py:
from django.contrib import admin
from django_mptt_admin.admin import DjangoMpttAdmin
from models import Country
class CountryAdmin(DjangoMpttAdmin):
pass
admin.site.register(Country, CountryAdmin)
Options
tree_auto_open
Auto-open node. Default value is 1.
Values: - True: autopen all nodes - False: do not autoopen - integer: autopen until this level
tree_load_on_demand
Load on demand (True / False / level). Default is True.
True: load nodes on demand
False: do not load nodes on demand
int: load nodes on demand until this level
autoescape
Autoescape (True / False). Default is True.
Autoescape titles in tree.
filter_tree_queryset
Override the filter_tree_queryset method to filter the queyset for the tree.
class CountryAdmin(DjangoMpttAdmin):
def filter_tree_queryset(self, queryset):
return queryset.filter(name='abc')
use_context_menu
True / False. Default is False.
“useContextMenu” option for tree.
Changelog
0.4.1 (september 21 2016)
Issue 162: Add request parameter to filter_tree_queryset signature (thanks to Max Perreault)
Issue 163: Update to jqtree 1.3.5
0.4.0 (august 3 2016)
- Issue 152: Django 1.10 support.
Drop support for Django 1.7
0.3.8 (july 27 2016)
Issue 142: use the Django admin static tag for CSS / Javascript (thanks to Alex Tomkins)
Issue 143: update jqtree to 1.3.4
0.3.7 (june 1 2016)
- Issue 132: use MPTTModelAdmin for DjangoMpttAdmin (thanks to Alex Tomkins)
MPTTModelAdmin contains fixes for mass deletions and TreeForeignKey
Issue 139: update to jqtree 1.3.3
0.3.6 (march 28 2016)
Issue 125: fix jQuery.cookie (thanks to Patrick Colmant)
0.3.5 (march 28 2016)
Issue 126: add missing jqtree-circle.png (thanks to Generalov)
0.3.4 (march 25 2016)
Issue 115: implemented ‘add’ button (thanks to Andrew Dodd)
Issue 116: fix block-style layout for right-to-left-languages
Issue 119: display transparent loading image
0.3.3 (february 10 2016)
Issue 112: correctly override media (thanks to Generalov)
0.3.2 (january 29 2016)
Issue 103: use jquery from django admin itself
Issue 105: added Turkish translation (thanks to Tagmat)
Issue 106: use the same colors as the Django admin
Issue 109: include locale files in package
0.3.1 (december 2 2015)
Issue 82: make admin views easily extendable (thanks to Vsevolod Novikov)
Issue 93: flat styling
Issue 95: update jqtree to 1.3.0
Issue 96: cannot move to the top of the tree
Issue 97: support Django 1.9
0.3.0 (august 21 2015)
Issue 67: update jqtree to 1.2.1
Issue 68: drop support for Django 1.6 and older
Note that version 0.2.1 supports these versions.
Issue 71: added use_context_menu option (thanks to ITCase)
Issue 75: added Russian translation (thanks to Mike Silonov)
Issue 80: fix wrong url resolving with multiple admin sites (thanks to Hubert Bielenia)
0.2.1 (march 29 2015)
Issue 65: support Django 1.8
0.2.0 (january 12 2015)
Issue 23: fixed save-state for load-on-demand
Issue 35: fixed auto-open for load-on-demand
Issue 40: use jqtree 1.0.0
Issue 45: added i18n support and Hebrew translation (thanks to Udi Oron)
Issue 47: added filter_tree_queryset method
0.1.10 (september 24 2014)
Issue 31: added autoescape option
Issue 34: use the default change list in popup mode (thanks to hstanev)
Issue 36: the option tree_load_on_demand = False does not work
0.1.9 (july 12 2014)
Issue 25: update jqtree to 0.21.0
Issue 28: fixing problems related to working with model’s pk-field, named other than “id” (thanks to Igor Gai)
Issue 29: fix path to spinner.gif (thanks to Igor Gai)
0.1.8 (februari 2 2014)
Issue 17: handle error when moving node
Issue 18: do not use inline javascript
Issue 19: support Django 1.7 alpha
0.1.7 (january 3 2014)
Issue 16: moving a node fails if the node id is a uuid
0.1.6 (october 10 2013)
Issue 8: removing node from the tree causes the tree view to crash
0.1.5 (august 27 2013)
Issue 6: save the tree state
Issue 7: do not handle the right mouse click
0.1.4 (august 8 2013)
Issue 5: Support for uuid ids
0.1.3 (may 2 2013)
This version drops support for Django 1.3.7
Issue 2: Posting a screenshot in the readme would be really useful (thanks to Andy Baker)
Issue 3: Use static templatetag for CDN-compatible file paths (thanks to Alex Holmes)
Added Coveralls support
0.1.2 (march 12 2013)
Issue 1: Grid view doesn’t link correctly to object change pages (thanks to Kris Fields)
0.1.1 (februari 25 2013)
Added experimental Python 3 support
0.1 (februari 7 2013)
Initial version
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
Built Distributions
File details
Details for the file django-mptt-admin-0.4.1.tar.gz
.
File metadata
- Download URL: django-mptt-admin-0.4.1.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49da7b77ff0e96151f5c4af802fe08aa12249fd6a15827877079c923a525058d |
|
MD5 | 9d62d1c3b1bf355b524cdf9aa06e921e |
|
BLAKE2b-256 | dc65a6689d4fe0565a818ba1a0e39b93cbdc0a0dc13dc0dac42d377a4d8461c6 |
File details
Details for the file django_mptt_admin-0.4.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_mptt_admin-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc483253ca31302598c9cfc117daee80d822a08df9093f72c359a12f96f2768 |
|
MD5 | fd00f1272d7b79d1bbf2a378c405573f |
|
BLAKE2b-256 | 57336a3cb7c9576ed8738521780c5ab0b6201062af65f3e36888acbeb5c8393c |
File details
Details for the file django_mptt_admin-0.4.1-py2.7.egg
.
File metadata
- Download URL: django_mptt_admin-0.4.1-py2.7.egg
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7aa9a95da0d59ac700d71ac166decbe35f8b896db2f45b827c80fe41dc255b3 |
|
MD5 | 2f0a97f6ef058ea74a97297123ab0768 |
|
BLAKE2b-256 | a71fb75a674fa9cc0cf2f3aba672f92adf49fdc5250e207a07bb463370839945 |