Fix for no model_name in django < 1.6

This commit is contained in:
Tom Graham 2014-10-22 17:35:24 +11:00
parent 15feb7def3
commit eef2a66f23

View File

@ -15,7 +15,7 @@ from django.contrib.auth import get_user_model
def user_admin_url(action): def user_admin_url(action):
user = get_user_model() user = get_user_model()
return 'admin:%s_%s_%s' % ( return 'admin:%s_%s_%s' % (
user._meta.app_label, user._meta.model_name, user._meta.app_label, user._meta.module_name.lower(),
action) action)
register = template.Library() register = template.Library()