Hi, You are probably not using the url() function, but just the tuple format.
You should have something like: urlpatterns = patterns('', url(r'^myform/$', 'mysite.views.myform', name="myform") ) instead of urlpatterns = patterns('', (r'^myform/$', 'mysite.views.myform', name="myform") ) The latter is, indeed, invalid python syntax, as you are naming a tuple position. Check https://docs.djangoproject.com/en/dev/topics/http/urls/#url for more info on this topic. Cheers, Adriano Teixeira On Sun, Aug 5, 2012 at 12:43 PM, Blaxton <blaxx...@yahoo.com> wrote: > > Hi > > Why following line cause an invalid syntax : > (r'^myform/$', 'mysite.views.myform', name="myform"), > > it seems named url pattern has changed from name="myform" to just 'myform' > because when I change it to: > (r'^myform/$', 'mysite.views.myform', 'myform'), > > it pass the syntax error and throw another error : > > dictionary update sequence element #0 has length 1; 2 is required > > > I am following this document: > > https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs > > to link a page to another one but it is not working. > > 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. > -- 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.