I can't figure out why this is invalid syntax...

Here is my code:
from cube.books.models import Listing
from django.contrib import admin
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic.list_detail import object_list

admin.autodiscover()

list_args = {
    'queryset' : Listing.objects.all(),
}

urlpatterns = patterns('',
    (r'^$', object_list, list_args, name='list'),
    (r'^help/', direct_to_template, {'template' : 'help.html'}),

    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/(.*)', admin.site.root),
)

And My Error:


('invalid syntax', ('/home/david/project/cube/urls.py', 15, 41,
"    (r'^$', object_list, list_args, name='list'),\n"))

Traceback:
File "/var/lib/python-support/python2.6/django/core/handlers/base.py"
in get_response
  77.                     request.path_info)
File "/var/lib/python-support/python2.6/django/core/urlresolvers.py"
in resolve
  179.             for pattern in self.urlconf_module.urlpatterns:
File "/var/lib/python-support/python2.6/django/core/urlresolvers.py"
in _get_urlconf_module
  198.             self._urlconf_module = __import__
(self.urlconf_name, {}, {}, [''])

Any help? 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to