Add administrative panel to allow for user deactivations etc.

We now show a list of users and allow you to deactivate a user using the
same process as `python manage.py deactivate_user`.

We add a new menu item accessible from the gear icon which will eventually
have much more than just this, but we have a good start here.

Here we also add a property to UserProfile which determines whether you're
eligible to access the administration panel, and then have code which shows
the menu option if so.

This introduces a new JS file, admin.js.

(imported from commit 52296fdedb46b4f32d541df43022ffccfb277297)
This commit is contained in:
Luke Faraone
2013-08-12 17:31:23 -04:00
parent 78d8153e6b
commit ecc42bc9f8
11 changed files with 155 additions and 2 deletions

View File

@@ -659,7 +659,8 @@ def home(request):
'nofontface': is_buggy_ua(request.META["HTTP_USER_AGENT"]),
'show_debug':
settings.DEBUG and ('show_debug' in request.GET),
'show_invites': show_invites
'show_invites': show_invites,
'show_admin': user_profile.show_admin,
},
context_instance=RequestContext(request))