('^/?$', views.index), # in app blog urls.py
On Sep 29, 1:59 am, Nuno Machado <m...@nunomachado.net> wrote:
> Hello all,
>
> I really enjoy the default Django behaviour of handling URL trailing
> slashes. If one have:
>
> (r'^contact', views.contact),
>
> It doesn't matter if someone visits mywebsite.com/contact OR
> mywebsite.com/contact/. It'll work anyway!
>
> The problem is when including app urls, for instance:
>
> (r'^blog', include('myproject.blog.urls')), # in main urls.py
>
> ('^$', views.index), # in app blog urls.py
>
> To visit the main blog page, one have to strictly point the browser to
> mywebsite.com/blog, it won't work with a trailing slash! :(
>
> Is there a way to allow both options; with AND without trailing slash?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---