mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
@@ -158,6 +158,8 @@ THIRD_PARTY_APPS = [
|
|||||||
'rest_framework',
|
'rest_framework',
|
||||||
'post_office',
|
'post_office',
|
||||||
'bootstrap_datepicker_plus',
|
'bootstrap_datepicker_plus',
|
||||||
|
'hijack',
|
||||||
|
'compat',
|
||||||
]
|
]
|
||||||
|
|
||||||
FIRST_PARTY_APPS = [
|
FIRST_PARTY_APPS = [
|
||||||
@@ -265,7 +267,7 @@ AUTH_USER_MODEL = 'people.User'
|
|||||||
|
|
||||||
LOGIN_URL = reverse_lazy('login')
|
LOGIN_URL = reverse_lazy('login')
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = reverse_lazy('index')
|
LOGIN_REDIRECT_URL = reverse_lazy('people:person.profile')
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||||
@@ -353,6 +355,13 @@ CONSTANCE_CONFIG_FIELDSETS = {
|
|||||||
|
|
||||||
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
|
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
|
||||||
|
|
||||||
|
|
||||||
|
# Django Hijack settings
|
||||||
|
# See https://django-hijack.readthedocs.io/en/stable/
|
||||||
|
|
||||||
|
HIJACK_USE_BOOTSTRAP = True
|
||||||
|
|
||||||
|
|
||||||
# Bootstrap settings
|
# Bootstrap settings
|
||||||
# See https://django-bootstrap4.readthedocs.io/en/latest/settings.html
|
# See https://django-bootstrap4.readthedocs.io/en/latest/settings.html
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,10 @@
|
|||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
<link rel="stylesheet" href="{% static 'css/global.css' %}">
|
<link rel="stylesheet" href="{% static 'css/global.css' %}">
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="{% static 'hijack/hijack-styles.css' %}" />
|
||||||
|
|
||||||
{% if 'javascript_in_head'|bootstrap_setting %}
|
{% if 'javascript_in_head'|bootstrap_setting %}
|
||||||
{% if 'include_jquery'|bootstrap_setting %}
|
{% if 'include_jquery'|bootstrap_setting %}
|
||||||
{# jQuery JavaScript if it is in head #}
|
{# jQuery JavaScript if it is in head #}
|
||||||
@@ -144,6 +148,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% load hijack_tags %}
|
||||||
|
{% hijack_notification %}
|
||||||
|
|
||||||
{% if request.user.is_authenticated and not request.user.has_person %}
|
{% if request.user.is_authenticated and not request.user.has_person %}
|
||||||
<div class="alert alert-info rounded-0" role="alert">
|
<div class="alert alert-info rounded-0" role="alert">
|
||||||
<p class="text-center mb-0">
|
<p class="text-center mb-0">
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ urlpatterns = [
|
|||||||
path('select2/',
|
path('select2/',
|
||||||
include('django_select2.urls')),
|
include('django_select2.urls')),
|
||||||
|
|
||||||
|
path('hijack/',
|
||||||
|
include('hijack.urls', namespace='hijack')),
|
||||||
|
|
||||||
path('',
|
path('',
|
||||||
include('django.contrib.auth.urls')),
|
include('django.contrib.auth.urls')),
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,13 @@
|
|||||||
href="{% url 'password_change' %}?next={{ person.get_absolute_url }}">Change Password</a>
|
href="{% url 'password_change' %}?next={{ person.get_absolute_url }}">Change Password</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if request.user.is_superuser and person.user %}
|
||||||
|
<form style="display: inline;" action="/hijack/{{ person.user.pk }}/" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-warning" type="submit">Hijack {{ person.name }}</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div id="map" style="height: 800px; width: 100%"></div>
|
<div id="map" style="height: 800px; width: 100%"></div>
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ Django==2.2.10
|
|||||||
django-appconf==1.0.3
|
django-appconf==1.0.3
|
||||||
django-bootstrap4==1.1.1
|
django-bootstrap4==1.1.1
|
||||||
django-bootstrap-datepicker-plus==3.0.5
|
django-bootstrap-datepicker-plus==3.0.5
|
||||||
|
django-compat==1.0.15
|
||||||
django-constance==2.6.0
|
django-constance==2.6.0
|
||||||
django-countries==5.5
|
django-countries==5.5
|
||||||
django-dbbackup==3.2.0
|
django-dbbackup==3.2.0
|
||||||
django-filter==2.2.0
|
django-filter==2.2.0
|
||||||
|
django-hijack==2.2.1
|
||||||
django-picklefield==2.1.1
|
django-picklefield==2.1.1
|
||||||
django-post-office==3.4.0
|
django-post-office==3.4.0
|
||||||
django-select2==7.2.0
|
django-select2==7.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user