-
Notifications
You must be signed in to change notification settings - Fork 657
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
django-mptt support #243
Comments
I had the same issue, so I am not currently using |
You can install FeinCMS, and then you'll have available the FeinCMSModelAdmin which is bundled with django-mptt. It subclasses FeinCMS's TreeEditor, which displays fine with grappelli's styles, and adds extra features to the changelist, like expandable / collapsable nodes, drag & drop for re ordering nodes and AJAX boolean editables. Though there are some look & feel issues with FeinCMSModelAdmin that don't match very well with Grappelli. And also I'm not really happy with having to install FeinCMS just to use its TreeEditor. Would it be a good addition for Grappelli to support MPTT models out of the box? I would be happy to try to add this support, refactoring out FeinCMS's TreeEditor into Grappelli. Or maybe its not that big deal having to install FeinCMS, and then Grappelli could just override the templates to fix the look & feel issues. |
supporting django-mptt is definitely planned, but I need to take a closer look at the possible issues. supporting FeinCMS is not planned though. |
I´ve been taking a look at django–mptt. Integration with Grappelli is easy (we just need to add 2 simple templates), but it´ll never look nice because of this: https://github.com/django-mptt/django-mptt/blob/master/mptt/templatetags/mptt_admin.py#L102 hardcoded margin with python-code. WTF! |
It could work if we changed this hard-coded padding with something like |
there should be a class instead of the hardcoded padding. if the guys over at django–mptt will change this, integration with grappelli is easy. |
Here´s a workaround: see https://gist.github.com/4452240 I´m closing this ticket for now. If the guys doing django–mptt will remove the paddings from python code, we´ll support mptt. |
Looks like the problem is already solved in django-mptt/master, as you can see here: django-mptt/django-mptt@686f536. |
+1 |
When using MPTTModelAdmin from django-mptt, the change list template is messed up. Has anybody fixed this?
The text was updated successfully, but these errors were encountered: