#28369: Provide ModelAdmin hooks for reversing URLs -------------------------------+-------------------------------------- Reporter: steve yeago | Owner: nobody Type: New feature | Status: new Component: contrib.admin | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by steve yeago): Well in some ways I think the patch creates some consistency given that there is already a hook for the "view on site" url in the admin. Grepping around, there could be some savings of lines get_*_url in the tests where basically the same hooks already exists. Example: http://dpaste.com/1JFCGQG The current implementation presumes that a modeladmin is registered under a namespace with no other args or kwargs, but that may not be the case if someone has included additional url args in get_urls(). Almost everything about the admin works fine out of the box in this situation aside from the somewhat superficial problem of where the user is redirect post-save because, the urls that are being reversed deep in response_change (and subsequently response_post_save_change) are hard-coded. -- Ticket URL: <https://code.djangoproject.com/ticket/28369#comment:3> Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.a98212e5a39660d43fcd5ad0be20d47f%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.