Hi all!

When I try to use Naming URL patterns I get error:
Exception Type:         ImproperlyConfigured
Exception Value:        Error while importing URLconf 'locations.urls':
invalid syntax (urls.py, line 13)
Exception Location:     /home/sector119/devel/django_src/django/core/
urlresolvers.py in _get_urlconf_module, line 255

When I remove name='locations-location_list' from my URLconf
everything is OK, but why? Why Django can't resolve that name?


root URLconf: % cat urls.py
from django.conf.urls.defaults import *

urlpatterns = patterns('',
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^locations/', include('locations.urls')),
)

locations URLconf: % cat apps/locations/urls.py
from django.conf.urls.defaults import *

# generic views

from locations.models import Location

location_list_info = {
    'queryset' :   Location.objects.all(),
    'paginate_by': 10,
}

urlpatterns = patterns('django.views.generic',
    (r'^location/$', 'list_detail.object_list', location_list_info,
name='locations-location_list'),
)

--~--~---------~--~----~------------~-------~--~----~
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