Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
140f6a89
Commit
140f6a89
authored
Sep 04, 2014
by
Chris Reffett
Browse files
Rename adminpanel to useradmin
parent
ed03bd4e
Changes
4
Show whitespace changes
Inline
Side-by-side
go/go/templates/navigation.html
View file @
140f6a89
...
...
@@ -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 'admin
panel
' %}"
>
Administration
</a></li>
<li><a
href=
"{% url '
user
admin' %}"
>
Administration
</a></li>
{% endif %}
<li><a
href=
"{% url 'go_logout' %}"
>
Log Out
</a></li>
{% else %}
...
...
go/go/templates/admin
panel
.html
→
go/go/templates/
user
admin.html
View file @
140f6a89
...
...
@@ -23,7 +23,7 @@ Go - Administration Panel
<h2>
Users awaiting moderation
</h2>
<form
method=
"post"
action=
"admin
panel
"
>
{% csrf_token %}
<form
method=
"post"
action=
"
user
admin"
>
{% csrf_token %}
<table
class=
"table table-striped table-hover "
>
<thead>
...
...
go/go/views.py
View file @
140f6a89
...
...
@@ -286,7 +286,7 @@ def staff_member_required(view_func, redirect_field_name=REDIRECT_FIELD_NAME, lo
@
staff_member_required
def
admin
panel
(
request
):
def
user
admin
(
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
,
'admin
panel
.html'
,{
return
render
(
request
,
'
user
admin.html'
,{
'need_approval'
:
need_approval
},
)
...
...
go/settings/urls.py
View file @
140f6a89
...
...
@@ -32,8 +32,8 @@ urlpatterns = patterns('go.views',
# /admin - Administrator interface.
url
(
r
'^admin/?'
,
include
(
admin
.
site
.
urls
)),
# /admin
panel - light admin
interface
url
(
r
'^admin
panel
/?$'
,
'admin
panel
'
,
name
=
'admin
panel
'
),
# /
user
admin
- user approval
interface
url
(
r
'^
user
admin/?$'
,
'
user
admin'
,
name
=
'
user
admin'
),
)
urlpatterns
+=
patterns
(
'django.contrib.auth.views'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment