Patchwork utilizes a number of Patchwork-only settings in addition to the
`Django`__ and `Django REST Framework`__ settings.
+__ https://docs.djangoproject.com/en/1.8/ref/settings/
+__ http://www.django-rest-framework.org/api-guide/settings/
+
+``ADMINS_HIDE``
+~~~~~~~~~~~~~~~
+
+If True, the details in `ADMINS`__ will be hidden from the *About* page
+(``/about``).
+
+.. versionadded:: 2.2
+
+__ https://docs.djangoproject.com/en/2.2/ref/settings/#admins
+
``DEFAULT_ITEMS_PER_PAGE``
~~~~~~~~~~~~~~~~~~~~~~~~~~
access. This is useful if SSL protocol is terminated upstream of the server
(e.g. at the load balancer)
-__ https://docs.djangoproject.com/en/1.8/ref/settings/
-__ http://www.django-rest-framework.org/api-guide/settings/
# the scheme based on current access. This is useful if SSL protocol
# is terminated upstream of the server (e.g. at the load balancer)
FORCE_HTTPS_LINKS = False
+
+# Set to True to hide admin details from the about page (/about)
+ADMINS_HIDE = False
# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
#
+ADMINS = (
+ ('Joe Bloggs', 'jbloggs@example.com'),
+)
ALLOWED_HOSTS = ['*']
NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
ADMINS = (
- ('Jeremy Kerr', 'jk@ozlabs.org'),
+ # Add administrator contact details in the form:
+ # ('Jeremy Kerr', 'jk@ozlabs.org'),
)
# Database
</ul>
</div>
+ {% if admins %}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Administrators</h3>
+ </div>
+ <ul class="list-group">
+ {% for admin in admins %}
+ <li class="list-group-item">
+ <a href="mailto:{{ admin.1 }}">{{ admin.0 }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">API Status</h3>
'rest': settings.ENABLE_REST_API,
'xmlrpc': settings.ENABLE_XMLRPC,
},
+ 'admins': () if settings.ADMINS_HIDE else settings.ADMINS,
}
return render(request, 'patchwork/about.html', context)