Logging level controlled by ASTAKOS_LOGGING_LEVEL setting.
- Email change mechanism
Enabled using ASTAKOS_EMAILCHANGE_ENABLED setting (disabled by default)
+- Additional user notification settings
+ ASTAKOS_SIGNUP_MESSAGES, ASTAKOS_PROFILE_MESSAGES, ASTAKOS_GLOBAL_MESSAGES
v0.5.1
# or implied, of GRNET S.A.
from astakos.im.settings import IM_MODULES, INVITATIONS_ENABLED, IM_STATIC_URL, \
- COOKIE_NAME, LOGIN_MESSAGES, PROFILE_EXTRA_LINKS
+ COOKIE_NAME, LOGIN_MESSAGES, SIGNUP_MESSAGES, PROFILE_MESSAGES, \
+ GLOBAL_MESSAGES, PROFILE_EXTRA_LINKS
from astakos.im.api.admin import get_menu
from astakos.im.util import get_query
def custom_messages(request):
return {
+ 'GLOBAL_MESSAGES' : GLOBAL_MESSAGES,
+ 'SIGNUP_MESSAGES' : SIGNUP_MESSAGES,
'LOGIN_MESSAGES' : LOGIN_MESSAGES,
+ 'PROFILE_MESSAGES' : PROFILE_MESSAGES,
'PROFILE_EXTRA_LINKS' : PROFILE_EXTRA_LINKS
}
# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {})
+# Messages to display on login page header
+# e.g. {'warning': 'This warning message will be displayed on the top of signup page'}
+SIGNUP_MESSAGES = getattr(settings, 'ASTAKOS_SIGNUP_MESSAGES', {})
+
+# Messages to display on login page header
+# e.g. {'warning': 'This warning message will be displayed on the top of profile page'}
+PROFILE_MESSAGES = getattr(settings, 'ASTAKOS_PROFILE_MESSAGES', {})
+
+# Messages to display on all pages
+# e.g. {'warning': 'This warning message will be displayed on the top of every page'}
+GLOBAL_MESSAGES = getattr(settings, 'ASTAKOS_GLOBAL_MESSAGES', {})
+
# messages to display as extra actions in account forms
# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {})
# Set the astakos main functions logging severity (None to disable)
from logging import INFO
-LOGGING_LEVEL = getattr(settings, 'ASTAKOS_LOGGING_LEVEL', INFO)
\ No newline at end of file
+LOGGING_LEVEL = getattr(settings, 'ASTAKOS_LOGGING_LEVEL', INFO)
+ul.messages li { margin-bottom: 5px }
+ul.messages { background-color: transparent; }
{% extends "im/base_two_cols.html" %}
+{% block extra_messages %}
+ {% if not messages %}
+ {% for msg_type, msg in GLOBAL_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
+ {% for msg_type, msg in PROFILE_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
+ {% endif %}
+{% endblock %}
+
{% load filters %}
{% block page.title %}Profile{% endblock %}
{% block extra_messages %}
{% if not messages %}
+ {% for msg_type, msg in GLOBAL_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
{% for msg_type, msg in LOGIN_MESSAGES.items %}
<li class="{{ msg_type }}">{{ msg|safe }}</li>
{% endfor %}
{% extends 'im/base_two_cols.html' %}
+{% block extra_messages %}
+ {% if not messages %}
+ {% for msg_type, msg in GLOBAL_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
+ {% for msg_type, msg in SIGNUP_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
+ {% endif %}
+{% endblock %}
{% block page.title %}
Signup
# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
#ASTAKOS_LOGIN_MESSAGES = {}
+# Messages to display on signup page header
+# e.g. {'warning': 'This warning message will be displayed on the top of signup page'}
+#ASTAKOS_SIGNUP_MESSAGES = {}
+
+# Messages to display on profile page header
+# e.g. {'warning': 'This warning message will be displayed on the top of profile pages'}
+#ASTAKOS_PROFILE_MESSAGES = {}
+
+# Messages to display on global page header
+# e.g. {'warning': 'This warning message will be displayed on the top of all pages'}
+#ASTAKOS_GLOBAL_MESSAGES = {}
+
# messages to display as extra actions in account forms
# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
#ASTAKOS_PROFILE_EXTRA_LINKS = {}