diff --git a/khaganat/static/khaganat/css/khaganat.css b/khaganat/static/khaganat/css/khaganat.css
index 371dade..469c22e 100644
--- a/khaganat/static/khaganat/css/khaganat.css
+++ b/khaganat/static/khaganat/css/khaganat.css
@@ -40,3 +40,7 @@ html,body {
font-style: italic;
color: #9073FF;
}
+
+.messages {
+ margin-top: 10px;
+}
diff --git a/khaganat/templates/khaganat/base.html b/khaganat/templates/khaganat/base.html
index 8fb83aa..4e6afdd 100644
--- a/khaganat/templates/khaganat/base.html
+++ b/khaganat/templates/khaganat/base.html
@@ -21,7 +21,20 @@
{% navbar %}
- {% block content %}{% endblock %}
+ {% if messages %}
+
+ {% for message in messages %}
+
+ {% if 'safe' in message.tags %}
+ {{ message|safe }}
+ {% else %}
+ {{ message }}
+ {% endif %}
+
+ {% endfor %}
+
+ {% endif %}
+ {% block content %}{% endblock %}
diff --git a/logs/views.py b/logs/views.py
index fbf9318..ae30534 100644
--- a/logs/views.py
+++ b/logs/views.py
@@ -111,9 +111,11 @@ class EntriesView(generic.ListView):
return False
def dispatch(self, request, *args, **kwargs):
- if not nsfw.is_nsfw_allowed(request):
- if self.is_nsfw():
+ if self.is_nsfw():
+ if not nsfw.is_nsfw_allowed(request):
return nsfw.redirect(request)
+ else:
+ nsfw.alert(request)
return super().dispatch(request, *args, **kwargs)
def get_context_data(self, **kwargs):
diff --git a/neluser/locale/en/LC_MESSAGES/django.po b/neluser/locale/en/LC_MESSAGES/django.po
index 2df83b5..ccf90f0 100644
--- a/neluser/locale/en/LC_MESSAGES/django.po
+++ b/neluser/locale/en/LC_MESSAGES/django.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-05-27 18:28+0200\n"
+"POT-Creation-Date: 2018-06-02 21:36+0200\n"
"PO-Revision-Date: 2018-02-04 01:03+0100\n"
"Last-Translator: Khaganat