Solved.
The url names were apparently being cached, so it appeared that naming a
included url didn't work.

Lesson: always restart django when changing url names

-Justin

On 11/18/07, Justin Fagnani <[EMAIL PROTECTED]> wrote:
>
> I've noticed that if you're trying to use named url patterns with an
> included urlconf that you need to label the pattern that includes the
> urlconf as well as the pattern being included with the same name. This seems
> to prevent having more than one named url in an included urlconf.
>
> Here's an example...
>
>
> My projects urlconf has this pattern
>
>
> url(r'^gallery/', include('myapps.gallery.urls'), name="gallery_main"),
>
>
> And my gallery app's urlconf has these patterns:
>
> url(r'^$', 'django.views.generic.list_detail.object_list',
> gallery_list_info, name="gallery_main"),
> url(r'view/(?P<object_id>\d+)/$', '
> django.views.generic.list_detail.object_detail ', gallery_detail_info,
> name="gallery_detail"),
>
> If the project urlconf doesn't have a named pattern, then {% url
> gallery_main %} doesn't work. If it does,
> {% url gallery_main %} works, but {% url gallery_detail gallery_id %}
> doesn't.
>
>
> Is this the intended behavior, are you just not supposed to use named urls
> with included urlconfs? Or is this a case that hasn't been figured out yet?
>
>
> I could see how there might be name conflicts when including multiple
> urlconfs, say with more than one url pattern named "main". Maybe then
> including urlconfs the names could be concatenated with a dot-syntax so that
> I could write {% url gallery.main %} and {% gallery.list %}
>
>
> -Justin
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to