add link to edit user in admin
This commit is contained in:
+5
-3
@@ -50,6 +50,7 @@ INSTALLED_APPS = [
|
||||
"wally",
|
||||
"atlas",
|
||||
"reversion",
|
||||
"debug_toolbar",
|
||||
"django_tables2",
|
||||
"django_filters",
|
||||
"easy_thumbnails",
|
||||
@@ -66,7 +67,6 @@ INSTALLED_APPS = [
|
||||
"django.contrib.sessions",
|
||||
"django.contrib.messages",
|
||||
"django.contrib.staticfiles",
|
||||
"debug_toolbar",
|
||||
"dbbackup",
|
||||
"rest_framework",
|
||||
"tinymce",
|
||||
@@ -77,10 +77,10 @@ INSTALLED_APPS = [
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
@@ -296,5 +296,7 @@ STATICFILES_DIRS = (
|
||||
|
||||
try:
|
||||
from .settings_local import *
|
||||
except ImportError:
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
print("UNABLE TO IMPORT LOCAL SETTINGS")
|
||||
pass
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
{% block content %}
|
||||
<h2>Editing user: {{object.username}}</h2>
|
||||
This form allows you to edit the users name and email address. More details (such as grade / supervisor / etc...) can be changed <a href="{% url 'account_profile_update' object.username %}">here</a>
|
||||
{% if request.user.is_superuser %}
|
||||
(<a href="{% url 'admin:auth_user_change' object.id %}" title="Edit the user using the admin interface">Admin Edit</a>)
|
||||
{% endif %}
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="Update">
|
||||
|
||||
Reference in New Issue
Block a user