Commit 140f6a89 authored by Chris Reffett's avatar Chris Reffett

Rename adminpanel to useradmin

parent ed03bd4e
......@@ -13,7 +13,7 @@
{% if user.is_authenticated %}
<li><a href="{% url 'my_links' %}">My Links</a></li>
{% if user.is_staff %}
<li><a href="{% url 'adminpanel' %}">Administration</a></li>
<li><a href="{% url 'useradmin' %}">Administration</a></li>
{% endif %}
<li><a href="{% url 'go_logout' %}">Log Out</a></li>
{% else %}
......
......@@ -23,7 +23,7 @@ Go - Administration Panel
<h2>Users awaiting moderation</h2>
<form method="post" action="adminpanel">{% csrf_token %}
<form method="post" action="useradmin">{% csrf_token %}
<table class="table table-striped table-hover ">
<thead>
......
......@@ -286,7 +286,7 @@ def staff_member_required(view_func, redirect_field_name=REDIRECT_FIELD_NAME, lo
@staff_member_required
def adminpanel(request):
def useradmin(request):
"""
This view is a simplified admin panel, so that staff don't need to log in
to approve links
......@@ -300,7 +300,7 @@ def adminpanel(request):
todeny = RegisteredUser.objects.get(username=request.POST['username'])
todeny.delete()
need_approval = RegisteredUser.objects.filter(approved=False)
return render(request, 'adminpanel.html',{
return render(request, 'useradmin.html',{
'need_approval': need_approval
},
)
......
......@@ -32,8 +32,8 @@ urlpatterns = patterns('go.views',
# /admin - Administrator interface.
url(r'^admin/?', include(admin.site.urls)),
# /adminpanel - light admin interface
url(r'^adminpanel/?$', 'adminpanel', name='adminpanel'),
# /useradmin - user approval interface
url(r'^useradmin/?$', 'useradmin', name='useradmin'),
)
urlpatterns += patterns('django.contrib.auth.views',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment