2012/8/17 Alexis Roda <alexis.roda.villalo...@gmail.com> > Al 17/08/12 17:42, En/na Rafael Romero Carmona ha escrit: > > Hi, I'm learning Django and I have problems with the urls.py. I show you >> how that's writed: >> >> from django.conf.urls import patterns, include, url >> >> from django.contrib import admin >> admin.autodiscover() >> >> urlpatterns = patterns('users.views', >> >> url(r'^volunters/$', 'voluntersindex'), >> url(r'^volunters/(?V<volunter_**id>\d+)/$', 'volunterdetails'), >> url(r'^organizers/$', 'organizersindex'), >> url(r'^organizers/(?O<**organizer_id>\d+)/$', 'organizerdetails'), >> url(r'^events/$', 'eventsindex'), >> url(r'^events/(?E<event_id>\d+**)/$', 'eventdetails'), >> >> ) >> >> urlpatterns += patterns('', >> url(r'^admin/', include(admin.site.urls)), >> ) >> >> When I try to show admin/, organizers/ and events/ I receive a menssage >> like:"unexpected end of pattern; Exception Location: >> /usr/lib/python2.6/re.py in _compile, line 245" >> >> How can I fix it? Thanks and sorry if I have errors in my sentences. >> > > The regular expressions are wrong, Try with (?P<volunter_id>\d+) etc. > > > I think that this is not the problem because I can access to volunters without problems. I have problems only with admin, organizers and events paths. I think that the problem isn't in other files because the problem is about regular expresions in the urls.py file, but if you want I could show you other files like views.py or others.
-- 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.