Here's my solutions, for anyone who may be experiencing the same
problem.
In my url config, I have 4 different named patterns corresponding to
each of the possibilities:
url(r'^(?P[a-zA-Z]+)/(?P[\+\-].\w+)/$',
'catalogueFilter', name="catalogue_search_no_filters"),
Hi Brian,
Thanks for your comment. I completely understand what you are saying,
and anyone trying to match the "?" character should take note, but in
this situation I am using it to try to tell Django that that named
group in the regular expression may, or may not, be included.
RM
On Nov 4,
I have to admit, the missing ) is a typo. I made up the ice cream
example to try to simplify my problem, and accidentally missed it off.
Perhaps my example is too simple.
> I have a small form on a page that is mostly optional fields with the
> exception of some drop down boxes.
My actual form
On Nov 4, 10:50 am, redmonkey <[EMAIL PROTECTED]> wrote:
>
> My problem is with the URL writing. I first wrote some unit tests to
> find the regular expressions that worked but Django doesn't seem to
> like the '?' in URL configurations.
? is a special character in regular expressions, just like
redmonkey wrote:
> Hi,
>
> I have a small form on a page that is mostly optional fields with the
> exception of some drop down boxes. I want to take the data submitted
> through this form and use them to form a URL.
>
> My problem is with the URL writing. I first wrote some unit tests to
> find
>
> Here, I collect the parameters from the form and try to turn them into
> a pretty URL that redirects to the filter view to do something with
> the data. It's the URL writing I'm having problems with. I want to
> write things like:
Why not do it in the process view immediatly?
> urlpatterns
Hi,
I have a small form on a page that is mostly optional fields with the
exception of some drop down boxes. I want to take the data submitted
through this form and use them to form a URL.
My problem is with the URL writing. I first wrote some unit tests to
find the regular expressions that
7 matches
Mail list logo