On Wed, 2008-07-09 at 04:51 -0700, JeffH wrote: > I have a URL mapping problem, running 0.96.2 on Windows. > > The problem: I have to specify the site name in the urls.py or else I > get 404s. > > For example: > urlpatterns = patterns('', > (r'^/$', home), > (r'^/home/$', theview), > (r'^SouthHavenReservations/home1/$', theview1), > (r'^SouthHavenReservations/home2/$', theview2), > (r'^SouthHavenReservations/admin/', > include('django.contrib.admin.urls')), > ) > > The first two REs (without the site prefix) give 404s. The last three > work fine. I can 'fix' the first two by including the site prefix.
That's right. It's a limitation in Django and something we're going to fix before 1.0. In fact, it's something we're going to fix before 1.0-alpha1, since it's going to be a bit backwards-incomaptible (once-off pain and very easy to fix, but still). Ticket #285 is probably the one to track if you care about exactly when this lands, but it will probably be fixed this weekend (or sooner, when I next get some time to sit down and cause major damage ... er... fix stuff in the tree). This one's my responsibility. For now, just live with it. Include the site prefix in the URLs (put it in a variable and include the variable in the front of each prefix if you think it might change). > In settings.py I have: > ROOT_URLCONF = 'SouthHavenReservations.urls' This has nothing to do with it. It determines the Python import path and has nothing to do with the URL as seen by Python. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---