0

Can I write follow statement in django template?

<a href="{% url 'settings:update' controll.id mode='change' %}">{{ controll.s_name }}</a>

If it possible then what will be in url.py and views.py

dMazay
  • 53
  • 1
  • 6
  • yes . its possible . you can find many examples in SO as well as in google . – Priyank Patel Mar 21 '14 at 12:53
  • What is correct request for search or mb some link? – dMazay Mar 21 '14 at 12:55
  • http://stackoverflow.com/questions/2325433/making-a-regex-django-url-token-optional This is one of example. – Priyank Patel Mar 21 '14 at 12:56
  • I tred follow regexp url(r'^(?P\d+)/(?P[a-zA-Z]+)/$', views.update, name='update') and def update(request, controller_id,mode) but I have exception "Don't mix *args and **kwargs in call to reverse()!" – dMazay Mar 21 '14 at 13:10

0 Answers0