My project uses a custom user model and I am trying to use a 3rd party app 
that uses the Reversing Admin 
URLs<https://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-admin-urls>technique
 to enhance my administration interface.

However problems arise when the app tries to make use of the url template 
tag to do a reverse lookup on the auth user ModelAdmin instance. When 
'auth_user_(something)' is referenced directly the template will produce a 
NoReverseMatch error. 

I would like to produce a patch for the package maintainer but I am unsure 
of how to reference the stand in user model without tying the app to my 
project or doing something kludgy that goes against the spirit of the 
django url tag.

The specific app I have been working with is the django-blog-zinnia 
application. Zinnia is using the following technique to provide changeset 
details in a generic way through the Django admin. 

The problem occurs when it tries to reverse auth_user_* when the site is 
using a custom user model. For Zinnia it occurs in the following places.

   - 
   
https://github.com/Fantomas42/django-blog-zinnia/blob/develop/zinnia/templates/admin/zinnia/widgets/_content_stats.html#L36
   - 
   
https://github.com/Fantomas42/django-blog-zinnia/blob/develop/zinnia/templates/zinnia/entry_list.html#L84

I have already 
reported<https://github.com/Fantomas42/django-blog-zinnia/pull/217#issuecomment-26962507>this
 issue to the Zinnia maintainer however I would like to provide 
something more meaningful in the way of a patch. Replacing the auth_user 
part of the offending lines with 'myapp_customuser' will fix the issue for 
me but how do I do something that is viable for a 3rd party application?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/11e950f6-a0da-4cc5-bb9c-ea88025915f8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to