id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 27569 Resolve reverse url with named groups regular expression to sprintf output formatters not specifying kwargs key / value pairs. Dmitriy Sintsov nobody "I wrote a pluggable app which supports Django reverse url calling from client-side Javascript (AJAX) via sprintf.js library: https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/e28d83886c5da0f4661257146a9925aabbcc93b8/django_jinja_knockout/static/js/front/app.js#L1276 To inject resolved reverse url with regex named parameters replaced to sprintf output formatters, without kwargs key / value pairs supplied, I use Python inspect module when django.django.core.urlresolvers.reverse throws NoReverseMatch exception to get values of caller variables f_locals keys 'prefix_norm' / '_prefix': https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/e28d83886c5da0f4661257146a9925aabbcc93b8/django_jinja_knockout/tpl.py#L180 Unfortunately that is a very hacky way because the urlresolvers code changes from one Django release to another one and I am afraid that at some point there could be new incompatibility. Is there any cleaner way to resolve reverse url with regex named parameters replaced to sprintf output formatters not specifying actual kwargs key / value pairs? Because internally urlresolvers module has these as prefix_norm / _prefix values. Or should I try to develop a core patch? That should be useful to many modules which route Django url names from Javascript client-side." New feature closed Core (URLs) 1.10 Normal wontfix reverse url Someday/Maybe 0 0 0 0 0 0