#13: Related objects interface should be tighter (edit_inline) ------------------------------------------------+--------------------------- Reporter: adrian | Owner: barbuza Status: reopened | Milestone: Component: django.contrib.admin | Version: SVN Resolution: | Keywords: nfa-someday nfa-changelist Triage Stage: Accepted | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 1 | ------------------------------------------------+--------------------------- Changes (by dokterbob):
* cc: mathijs@… (added) * has_patch: 0 => 1 Comment: So far, it seems that no work has been done on this issue for a long time. Meanwhile, I am sure that it is still a feature that many users would like to see integrated into the Django admin. Given that, by now, people have made the wise decision to ship jQuery with the Django admin, it seems to me as about time to start fixing this issue. Currently, if `order_with_respect_to` is specifeid in a Model's Meta field is specified, a cute `_order` field is indeed added to the Model's database table. However (AFAIK because of the underscore), this field is not represented at all in the Admin interface. This implies that - for now - it is still easier to explicitly add some Integer ordering field to a Model rather than using the much more elegant, available, but disfunctional, API that ships with Django. As fixing/completing this feature should be fairly easy for someone who's used to getting into the debts of the (very scarcely documented) Admin/Model internals, it might not even be too unrealistic to have this fixed before 1.3 or the first point release after. To make it a bit easier, I have made a start by providing this patch which fixes at least the `get_ordered_objects` method of Model's `_meta`. This causes the Admin to load a non-existant file `dom-drag.js` which should be replaced by a jQuery equivalent thereof. Furthermore, the InlineModelAdmin's formset should have it's `can_order` parameter set to `True`, I believe, to allow for the ordering to get through to the Admin in the first place. Meanwhile, I have spotted the following tickets relating to this same issue - parts of which I used for writing the - still very incomplete - patch: * #13296 * #9338 * #2137 -- Ticket URL: <http://code.djangoproject.com/ticket/13#comment:87> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.