I must have some sort of misconception of how GET variables can be manipulated in django, but here goes:
(1) I have a search form that has two required parameters, and one optional parameters.
The form sends to /search/ like so :
<form action="/search/" method="GET">
However, the urls that result from this look something like
http://mylifeforregex:8000/search/?keyword=keyword&columns=name&exact=on
I'm not able to match it in my urlpatterns with the following line :
url(r'^search/(?P<keyword>\w+)(?P<columns>\w+)(?P<exact>\w+)?$', 'home', name='searched')
So if someone could tell me what exactly I'm doing wrong with this regex, it'd be much appreciated.
(2) The more interesting question I have personally is : is there any way I can change the way the form data will be presented? Is it possible to have the form query result in a url that looks like
http://halp:8000/search/keywordquery/columnquery/optionmarked