Adding the name argument seems pretty straight forward, but I must be doing something wrong. I am writing tests and have the URLs named seems like the easiest way to look them up.
My URL dispatch file was working before I added any of the name='this- name' arguments. Here is my file: from django.conf.urls.defaults import * urlpatterns = patterns('ukca_admin.coupon.mailer_views', (r'^notify/(?P<what>\w+)?/?(?P<when>[\w\-]+)?/?(? P<where>\w+)?/?(?P<status>\w+)?/?$', 'notify_account_manager', name='notify-account-manager'), (r'^build/(?P<id>\d+)?/(?P<what>\w+)?/?(? P<when>[\w\-]+)?/?(?P<where>\w+)?/?(?P<status>\w+)?/?(?P<which>\w+)?/? $', 'mailer_index', name='mailer-index'), (r'^rebuild/offers/(?P<what>\w+)?/?(?P<when>[\w \-]+)?/?(?P<where>\w+)?/?(?P<status>\w+)?/?(?P<which>\w+)?/?$', 'rebuild_offers', name='rebuild-offers'), (r'^rebuild/recipients/(?P<what>\w+)?/?(? P<when>[\w\-]+)?/?(?P<where>\w+)?/?(?P<status>\w+)?/?(?P<which>\w+)?/? $', 'rebuild_recipients', name='rebuild-recipients'), ) And here is the error I get: SyntaxError at /mailer/ ('invalid syntax', ('/var/www/ccadmin/ukca_admin/../ukca_admin/coupon/ mailer_urls.py', 4, 139, " (r'^notify/(?P<what>\\w +)?/?(?P<when>[\\w\\-]+)?/?(?P<where>\\w+)?/?(?P<status>\\w+)?/?$', 'notify_account_manager', name='notify-account-manager'),\n")) Request Method: GET Request URL: http://ccadmin.jt.ccbn.net/mailer/ Exception Type: SyntaxError Exception Value: ('invalid syntax', ('/var/www/ccadmin/ukca_admin/../ukca_admin/coupon/ mailer_urls.py', 4, 139, " (r'^notify/(?P<what>\\w +)?/?(?P<when>[\\w\\-]+)?/?(?P<where>\\w+)?/?(?P<status>\\w+)?/?$', 'notify_account_manager', name='notify-account-manager'),\n")) Exception Location: /usr/lib/python2.6/site-packages/django/utils/ importlib.py in import_module, line 35 Python Executable: /usr/bin/python Python Version: 2.6.4 Python Path: ['/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/ usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/ lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/ lib64/python2.6/site-packages', '/usr/lib/python2.6/site-packages', '/ var/www/ccadmin/ukca_admin/../Django-1.1.1', '/var/www/ccadmin/ ukca_admin', '/var/www/ccadmin/ukca_admin/lib', '/var/www/ccadmin/ ukca_admin/../'] Server time: Thu, 22 Apr 2010 16:27:21 +0100 Thanks! --Jim -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.