Changes between Initial Version and Version 1 of Ticket #19002, comment 3
- Timestamp:
- Sep 27, 2012, 9:50:34 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19002, comment 3
initial v1 1 1 What do you mean with ''"the link do not works at all"''? Where do these URLs point to? What do you mean with ''"I've got multiple admin sites with different names"''? Are they AdminSite instances? 2 2 3 Referencing the admin docs (https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#multiple-admin-sites-in-the-same-urlconf) and the namespaced URLs docs (https://docs.djangoproject.com/en/1.4/topics/http/urls/#defining-url-namespaces and https://docs.djangoproject.com/en/1.4/topics/http/urls/#url-namespaces) all the admin app instances share the same application namespace (`'admin'`) and what allows to differenciates among their URL namespaces when reversin named URLs with reverse() (or equivalente ''url'' template tag) is the value of the ''current_app'' argument.3 Referencing the admin docs (https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#multiple-admin-sites-in-the-same-urlconf) and the namespaced URLs docs (https://docs.djangoproject.com/en/1.4/topics/http/urls/#defining-url-namespaces and https://docs.djangoproject.com/en/1.4/topics/http/urls/#url-namespaces) all the admin app instances share the same application namespace (`'admin'`). That's th reason we are using the `'admin:` prefix in the URL names. 4 4 5 In the case of the admin app it's the ``AdminSite.name`` value which is the one you can control and which is the one we are passedas ''current_app'' in all calls to reverse().5 What allows to differenciate/choose among the URL namespaces of these app instances when reversing named URLs with reverse() (or equivalent ''url'' template tag occurrence) is the value of the ''current_app'' argument. In the case of the admin app it's the ``AdminSite.name`` value which is the one you can control and which is the one we are passing as ''current_app'' in all calls to reverse().