Russell Keith-Magee wrote: > On the 'missing something' front, reverse() now takes a 'current_app' > argument that gives context to the app lookup, which resolves the > ambiguity from the point of view of the reverse() function.
I saw this one. It doesn't work in this case exactly beacuse of this: > This solves the problem as long as applications have been built to > provide a namespace. Which means an app knows its exact namespace. > However, this doesn't fully address the 'bug' you > describe - an application that hasn't been built to accept namespaces > will have problems if it is deployed in a namespace. There's important detail here. One thing is a namespace-ignorant application that just uses reversing the old way. I don't think we can fix it in any way except saying somehow "don't install this app under a namespace" (as you suggested). Another thing is an application that is being written now and that wants to be namespace-aware. The problem is that while an application knows that it can be included under a namespace it doesn't care under which one exactly. As far as I can tell it can be solved by keeping views in resolver.reverse_dict as it was before namespaces were introduced as well as in namespace_dict and app_dict. This way they could be found both by specifying a name with or without namespace. However it doesn't solve the problem when you have two instances of the same application. For this we should have a way for an application to know which instance of it is "current". Which means tying reversing to a request (right?). At this point I didn't come up with anything more useful... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---