That is just terrific Raúl, thanks a lot! code I ended up using: url(r'^cgi-bin/DocDB/ ShowDocument','docDB.views.retrieveDocumentVersion')
documentid = int(request.GET.get('docid')) version = request.GET.get('version', '') On Apr 21, 4:16 pm, Raúl Cumplido <raulcumpl...@gmail.com> wrote: > sorry copy&paste error: > > *u*rl(r'^cgi-bin/DocDB/ShowDocument\$', > 'docDB.views.retrieveDocumentVersion'), > > 2011/4/21 Raúl Cumplido <raulcumpl...@gmail.com> > > > > > Hi, > > > That data is not part of the path they are part of the querystring. It > > would be better to set your urls.py as: > > > rl(r'^cgi-bin/DocDB/ShowDocument\$', > > 'docDB.views.retrieveDocumentVersion'), > > > And retrieve values in your view as: > > > request.GET.get('docid', '') > > and > > request.GET.get('version', '') > > > Look at the documentation here: > > >http://docs.djangoproject.com/en/1.3/ref/request-response/#django.htt... > > > Raúl > > > On Thu, Apr 21, 2011 at 3:59 PM, Michel30 <forerunn...@gmail.com> wrote: > > >> Hey guy's, > > >> I'm trying to replicate behaviour of a legacy CMS and stick it into a > >> new Django project. > > >> Here is an example of my url: > > >>http://hostname:port/cgi-bin/DocDB/ShowDocument?docid=19530&version=1 > > >> I want to filter the docid and version with a regex in a urlpattern to > >> use later in a function: > > >> url(r'^cgi-bin/DocDB/ShowDocument\?docid=(?P<documentid>\d+)\? > >> version=(?P<version>\d+)', 'docDB.views.retrieveDocumentVersion'), > > >> I've tried about every way of escaping the '? ' but can't get it to > >> work... > > >> Any ideas anyone? > > >> 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. > > > -- > > Raúl Cumplido > > -- > Raúl Cumplido -- 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.