django-best-practices icon indicating copy to clipboard operation
django-best-practices copied to clipboard

Using URLs' namespaces

Open davidbgk opened this issue 13 years ago • 0 comments

From http://lincolnloop.com/django-best-practices/apps/modules/urls.html

Should have a name attribute so they are reversible; APP_MODEL_VIEW, for example blog_post_detail or blog_post_list.

May I suggest:

Should have a name attribute and a namespace so they are reversible and unique to the application, for example blog:post_detail or blog:post_list.

References: https://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces

davidbgk avatar Sep 19 '12 16:09 davidbgk