#32085: Add template tag for creating link to admin site
-------------------------------------+-------------------------------------
Reporter: Dart | Owner: nobody
Type: New | Status: new
feature |
Component: Template | Version: 3.1
system |
Severity: Normal | Keywords: Tags, Admin, Urls
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Hey! In some situations during development django apps, i need some way to
create link into django admin for changing, deleting specific model
instance.
Looking into of souces django you can see, that django has prefix names
for dynamic models. For more look at get_urls() method from ModelAdmin.
Example:
info = self.model._meta.app_label, self.model._meta.model_name
url = path('add/', wrap(self.add_view), name='%s_%s_add' % info)
I am propose to write template tag which accept any model instance and
action (update, delete, etc) and return correct url for django admin site.
Maybe this situation is too rare, its need some discussion.
Regards, Viktor Lomakin
--
Ticket URL: <https://code.djangoproject.com/ticket/32085>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.5722bfcc13588e2169579b605f63138f%40djangoproject.com.