Code

Changes between Version 1 and Version 2 of Ticket #19002, comment 3


Ignore:
Timestamp:
09/27/12 08:12:32 (22 months ago)
Author:
ramiro
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19002, comment 3

    v1 v2  
    33Referencing 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. 
    44 
    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(). 
     5What 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().