@register.filter
def user_admin_urlname(action):
 user = get_user_model()
 return ('admin:%s_%s_%s' % (user._meta.app_label, user._meta.model_name, action))

@ register . filter def user_admin_urlname ( action ) : user = get_user_model ( ) return ( 'admin:%s_%s_%s' % ( user . _meta . app_label , user . _meta . model_name , action ) )
return the admin urls for the user app used .