Thursday, March 29, 2012

Re: Problems with {% url %} in templates

Hi Jamie,

On 29/03/12 20:49, Jamie Lawrence wrote:
> I'm very confused… this has worked fine in the past. Django 1.3.1
>
> In myproject/urls.py:
>
> urlpatterns = patterns('',
> (r'^d/events/(.*)$', include('myproject.events.urls')),
> […]
Don't include the (.*)$ in the regex for the include. The documented
pattern [1] for the include is

(r'^d/events/', include('myproject.events.urls')),

Regards,
Alasdair

[1]:
https://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs

--
Alasdair Nicol
Developer, MEMSET

mail: alasdair@memset.com
web: http://www.memset.com/

Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford, Surrey, GU2 7YD, UK.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment