Restricting named URL patterns to app
|Reported by:||rihad||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by kmtracey)
When you name your URL patterns, make sure you use names that are unlikely to clash with any other application's choice of names. If you call your URL pattern comment, and another application does the same thing, there's no guarantee which URL will be inserted into your template when you use this name.
Putting a prefix on your URL names, perhaps derived from the application name, will decrease the chances of collision. We recommend something like myapp-comment instead of comment.
Taken from here: http://docs.djangoproject.com/en/dev/topics/http/urls/
I'm sure Django knows in the context of which app it's currently operating, so can't it deduce the app-specific prefix that would make the name unique across the project (like the app name) itself? For example in Symfony web-framework routing labels (aka named URL patterns) are app, not project, specific.