On Fri, 2007-03-30 at 04:15 +0000, Nicolas E. Lara G. wrote: > Other than using uncommon names for the url one could just use the > most obvious name and let the url tag have a disambiguation function > so if the name is: "name" you could write both: > {% url 'name' %} and {% url 'myapp.name' %} (or "myapp/name" or > "myapp-name")
The problem is predicting what we be called if you use the unprefixed argument. It's going be non-deterministic from an application's point of view, so they will *always* have to use a name that is unlikely to collide. Remember that templates have no point of reference -- they don't know that they were called from a particular app, so they'll always be scanning the URL configuration from the top level. > With this you could keep the url management simple for most cases and > allow users to differentiate colliding names (it would be terrible > that if a name is taken by, lets say, comments or another contrib app > users had problems for setting up url names) Which is the argument for using uncommon names for your urls. The exact same problem exists for application names. You can't create an app called django and expect it to work. Fortunately, django is one of many uncommon names you can use for an app, so it's easy to pick non-colliding names. If you choose "comments" for you redistributable app and somebody else does, too, you're both screwed. Name collision potential exists all the time (try writing an executable called "ls" and seeing how wide a distribution you get) and society hasn't ground to a halt just for asking people to be a little creative. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---