On Monday, 7 December 2015 10:24:48 UTC, pa xapy wrote:
-- there is two approaches:you can either create unique names for each url pattern entry like url(...., name='my_app_unique_view_name')
or use namespace and pass it to reverse like reverse('my-app-namespace:my-url-pattern-view-name')
But that doesn't account for either of the points in my question, i.e. that (a) the app does not know its "app_name" as that is defined by the site not the app, and (b) if you did somehow know and use the app_name then how does Django know which instance you mean?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/64b17837-cd81-4572-8809-59684c8fc712%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment