Using Django 1.3, I'm declaring a javascript file in the Media class of a ModelForm. For the jsi18n javascript catalog, the examples show the path hard coded:
However, I want to make this a little more portable by replacing the path with a reverse() call. I tried this:
js = (reverse('admin:jsi18n'))
which failed when the form was imported. However, I can use the same argument in a URL call in the template:
{% url 'admin:jsi18n' %}
Any advice on how I can use reverse() in the Media class? I haven't found anything helpful in my searches.
Thanks,
Dan Gentry