Re: Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
Correction:

My URL tag does not include the quotes.  Should be:

{% url admin:jsi18n %}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ifbpxbJtw_wJ.
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.



Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
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:

js = ('/admin/jsi18n/')

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/WUsQvc_QxKAJ.
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.