On Sunday, 5 August 2012 12:43:48 UTC+1, Blaxxton 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 >
The documentation - presumably the page you meant to link to is https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns - doesn't use *either* of the patterns you show. It uses the `url` function: url(r'^myform/$', 'mysite.views.myform', name="myform"), -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/j6VzK6qqrD8J. 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.