New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin tree management #57
Comments
insin (12 Oct 08): Thanks for this - it might be bit messy, but it's a great start in terms of how to |
absolute.search (03 Feb 09): This is an excellent addition to an already already project, many thanks. Although this isn't a django-mptt problem, per se: Is this a known problem? |
absolute.search (03 Feb 09): I have solved the IE error problem by removing the spurious comma from the buildNSW ... Hope that's of help to someone else. |
matthiask (26 Feb 09): Disclaimer: I'm the primary author of tusk cms, and I can't say I'm very proud of the In the meantime, we have completely rewritten the code and made it much more |
matthiask (26 Feb 09): Oops. I wanted to add a link to an email I sent to django-users here, sorry for http://groups.google.com/group/django-users/browse_thread/thread/b543144640ac1d4a |
T.Karbownicki (21 May 09): Thanks for mptt_admin.diff! Works great! |
o...@gezgin.com (29 Jun 09): The possibility of using MPTT in admin made me start using it. Thanks for your efforts. However, the data does not show up in the change list view, and the url to sen the "invalid literal for int() with base 10: 'json'" I am using a recent SVN version of Django. I think in the MpttModelAdmin, get_urls() I tried copying the get_urls() into the MpttModelAdmin and adding the json url as such:
but i am still getting the same error. |
o...@gezgin.com (30 Jun 09): I should be more careful with the urlpatterns. I get it working like this: def get_urls(self): But _build_tree() method also needs to be modified to supply the extra 'form' def _build_tree(nodes, cl): Though the resulting form does look a bit deformed because of the checkboxes added, |
andrepleblanc (14 Jul 09): I tried implementing your fixed with the overridden get_urls but I can't figure out |
o...@gezgin.com (15 Jul 09): Sorry, I've cropped that line too when pasting. 'info' is: info = self.admin_site.name, self.model._meta.app_label, self.model._meta.module_name Set it just before urlpatterns = patterns(....). |
michele.pasin (06 Aug 09): the original diff posted at the top of this page worked all right for me !! Thanks!!! Only thing I had to fix was the path to the media files in new admin.py file, e.g.: |
michele.pasin (12 Aug 09): Hi there - a small update: the tree visualization needs to be improved cause if there are a lot of lines (e.g. more |
matthiask (12 Aug 09): Disclaimer: I'm the original author of tusk CMS, which I've abandoned a long time ago. http://spinlock.ch/pub/feincms/ (Screenshots & Links) |
michele.pasin (18 Aug 09): Hi there - to whoever might be interested - I posted a bunch of simple instructions for using MPTT with http://magicrebirth.wordpress.com/2009/08/18/django-admin-and-mptt-2/ Matthias, tx again for the useful tips!!! |
d...@pdll.pl (19 Jan 10): I found a bug in admin json.js: when we drag element from level1 (tree_id=1) to |
a.schmid00 (26 Jan 10): im on django 1.1.1 using sqlite3 and if i want to look at my objects in the admin i |
T.Karbownicki (27 Apr 10): I removed the bug that didn't increase tree_id. admin.py |
michele.pasin (17 Jun 10): People - with relation to my comment above [n. 15] - the example code have moved here: |
craigds (28 Sep 10): See google group discussion re admin changes for 0.4: http://groups.google.com/group/django-mptt-dev/browse_thread/thread/63f9fc221246f527 |
craigds (01 Oct 10): Done in 0.4, with a bare-bones ModelAdmin and a FeinCMS one for those with FeinCMS |
Originally GC 33
Attached is a patch that will allow a tree to be managed in the admin
interface using the jQuery NestedSortableWidget
(http://code.google.com/p/nestedsortables/wiki/NestedSortableWidgetDocumentation).
I have shamelessly lifted some code from the Tusk CMS, credit goes to them
for the idea (http://code.google.com/p/tusk-cms/). It's a little messy and
hacky at the moment, but it should work.
Some sample usage in admin.py:
from django.contrib import admin
from mptt.admin import MpttModelAdmin
class CategoryAdmin(MpttModelAdmin):
list_display = ('title',)
admin.site.register(Category, CategoryAdmin)
The files in mptt_media.tar.gz need to be put in your MEDIA_URL directory.
The text was updated successfully, but these errors were encountered: