I'm working on an app which makes extensive use of AJAX. I'm also using named URLs so I don't have to hard-code URLs into my templates.
The problem is that if a URL pattern requires extra info after the path, my templates don't render, because the extra parameters aren't known until the user makes a selection. The obvious solution is to make two URL patterns for each of these URLs -- one with no extra parameters and one with. Then change the former into the latter in the app by AJAX. Is there a better way to do this? Example: #urls.py: url(r'^update_payment/(?P<payment_id>\w+)', update_payment, name = 'update_payment'), #template: <a href="{% url update_payment %}">Update Payment</a> {# this expects a second argument I don't know yet #} Thanks, Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.