[Django]-Url with multiple optional arguments

2👍

Don’t try and do this with URL arguments. Instead, use querystring arguments. The URL should be in the form:

my_path/?date=May&owner=Jack&category=Gas&status=accepted

and the URL pattern is just:

url(r'^my_path/$', views.my_view, 'my_url'),

and in the view you can access request.GET['date'] etc.

Leave a comment