#11642: Specify default namespace in urls.py -------------------------------------+-------------------------------------- Reporter: mrmachine | Owner: nobody Status: new | Milestone: Component: Core framework | Version: 1.1 Resolution: | Keywords: url namespace default Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------+-------------------------------------- Changes (by russellm):
* needs_better_patch: => 0 * stage: Unreviewed => Accepted * needs_tests: => 0 * needs_docs: => 0 Comment: There's the start of an idea here, but it's not fully formed. For starters, there isn't a single concept of a 'namespace' - there's the application namespace and the instance namespace. What you refer to as the "default" namespace is the application namespace. Essentially, it sounds like you're proposing that include('myapp.urls', namespace='foo', app_name='bar') can be made easier for the case where an application knows it can provide a namespace. I agree with this. However, it isn't quite as simple as you describe. By definition, you can't define the instance namespace in the way you describe. However, you could define the application namespace in this way. There are some issues that need to be resolved here - for instance: * What happens when you define an application namespace, but not an instance namespace? This would happen if you ever did include('myapp.urls') when myapp.urls defines an app_name internally. * What takes precedence? An app_name defined in the include, or in the app itself? I'll mark this as accepted in principle - but there is some design work that still needs to be done. If you can resolve what happens in the edge cases, this shouldn't be too hard to implement (patches welcome). -- Ticket URL: <http://code.djangoproject.com/ticket/11642#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---