~ricardokirkner/django-openid-auth/support-django-1.10

« back to all changes in this revision

Viewing changes to django_openid_auth/admin.py

  • Committer: Ricardo Kirkner
  • Date: 2015-09-22 13:18:46 UTC
  • mfrom: (114.1.2 trunk)
  • Revision ID: ricardo.kirkner@canonical.com-20150922131846-j96q89fo106hok54
support custom user model instead of hardcoded contrib User model

this requires to depend on django >= 1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
 
98
98
    if not request.user.is_staff:
99
99
        return views.default_render_failure(
100
 
            request, "User %s does not have admin/staff access."
101
 
            % request.user.username)
 
100
            request, "%s %s does not have admin/staff access."
 
101
            % (settings.AUTH_USER_MODEL, request.user.username))
102
102
 
103
103
    # No error message was supplied
104
104
    assert error_message, "Unknown Error: %s" % error_message