On 14 jan, 13:54, Chris Lee <[email protected]> wrote: > Hi Django gurus, > > I'm coding-up a failure tracking database, and came up with what I > thought was a straightforward way to encode different searches into > part-failures via a single URL pattern. > > In urls.py: > > url(r'^part_failure_list(/project/(?P<project_id>\d+))?(/platform/(? > P<platform_id>\d+))?(/hw_category/(?P<hw_category_id>\d+))?(/ > hw_subcategory/(?P<hw_subcategory_id>\d+))?....', #more stuff like > this > 'tracker.track.views.part_failure_list', > { 'nav_context': nav_context }, > 'part_failure_list'), > ) > > Then in views.py, the function 'part_failure_list' looks for the > existence of each of the keyword arguments and filters the query > appropriately.
The canonical way to encode search arguments in an URL is to use the querystring. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

