I have urls like:
url(r'^utilisateurs/$', view = list_users, name='list_users'),
url(r'^utilisateurs/(?P<userType>[\w-]+)/$', view = list_users, name='list_users_by_type'),
url(r'^utilisateurs/order_by/(?P<orderBy>[\w-]+)/$', view = list_users, name='list_users_order_by'),
url(r'^utilisateurs/(?P<userType>[\w-]+)/order_by/(?P<orderBy>[\w-]+)/$', view = list_users, name='list_users_by_type_order_by'),
I am trying to put a order_by tab in my template like below:
<ul id='menu-order-by'>
<li><a href='{{ request.get_full_path }}order_by/title/'>Title</a></li>
</ul>
As you can see i am adding order_by parameter manually because the list can already be filtered . And the order_by menu items must order according to the current filtered list.
Can there be a better way to accomplist this task?