I am new to Django and Python and have what must be a basic question.
I want to pass a URL of the following form, containing an email
address that I will later look up contact information from.
e.g. http://localhost:8000/contact/ronald.ninnis%40cdu.edu.au/
I don't care about whether this is a valid email string I simple want
to pass the parameter across to the view and do the look up here.
I notice the @ is already %40 which has been escaped by the Javascript
in the calling application.
In my urls.py I have the following regex.
urls.py
(r'^contact/(?P<email>\[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4})/$',
'entitlements.sfdc.views.contactdetail'),
But no match is found. Could someone point out the error of my ways?
Many Thanks,
Jono
I want to pass a URL of the following form, containing an email
address that I will later look up contact information from.
e.g. http://localhost:8000/contact/ronald.ninnis%40cdu.edu.au/
I don't care about whether this is a valid email string I simple want
to pass the parameter across to the view and do the look up here.
I notice the @ is already %40 which has been escaped by the Javascript
in the calling application.
In my urls.py I have the following regex.
urls.py
(r'^contact/(?P<email>\[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4})/$',
'entitlements.sfdc.views.contactdetail'),
But no match is found. Could someone point out the error of my ways?