Fix last commit

This commit is contained in:
Kumi 2019-01-24 14:18:07 +01:00
parent c19520b435
commit b5d9047dd6
3 changed files with 4 additions and 8 deletions

View file

@ -277,8 +277,7 @@ def devices(request):
"organization": orga, "organization": orga,
"devices": sorted(devices, key=lambda x: x.serial), "devices": sorted(devices, key=lambda x: x.serial),
"wifis": sorted(wifis, key=lambda x: x.serial), "wifis": sorted(wifis, key=lambda x: x.serial),
"users": sorted(users, key=lambda x: x.username), "users": sorted(users, key=lambda x: x.username)
"notifications": getNotifications()
} }
) )

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load notifications %}
{% block content %} {% block content %}
@ -7,11 +8,7 @@
<div align="center"><b>Manage:</b> <a id="linkdevices" href="#" onclick="showdevices();">Devices</a> &dash; <a id="linkwifi" href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} &dash; <a id="linkusers" href="#" onclick="showusers();">Users</a>{% endif %}</div> <div align="center"><b>Manage:</b> <a id="linkdevices" href="#" onclick="showdevices();">Devices</a> &dash; <a id="linkwifi" href="#" onclick="showwifi();">WiFi</a>{% if user.is_staff %} &dash; <a id="linkusers" href="#" onclick="showusers();">Users</a>{% endif %}</div>
{% for notification in notifications %} {% getNotifications %}
<div class="alert alert-{% if notification.status == 0 %}info{% elif notification.status == 1 %}warning{% else %}danger{% endif %}">
<strong>{% if notification.status == 0 %}Notice:{% elif notification.status == 1 %}Warning:{% else %}Emergency:{% endif %}</strong> {{ notification.text }}
</div>
{% endfor %}
<div name="devicespart" id="devicespart"> <div name="devicespart" id="devicespart">
<h2>Devices</h2> <h2>Devices</h2>

View file

@ -7,7 +7,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '=go8&h#^kh6ksr11e2z-@4qqd6t%63$x#-!s#l_yhw@oyanrys' SECRET_KEY = '=go8&h#^kh6ksr11e2z-@4qqd6t%63$x#-!s#l_yhw@oyanrys'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False DEBUG = True
ALLOWED_HOSTS = ["admin360.kumi.host"] ALLOWED_HOSTS = ["admin360.kumi.host"]