piki/pages/messages.py

13 lines
554 B
Python
Raw Normal View History

2024-10-05 16:22:40 +02:00
from django.contrib import messages
from django.utils.translation import gettext as _
def permission_denied_msg_page(request, rel_path):
# TODO: Add translation for this message
messages.error(request, _("Permission denied: You don't have sufficient acces to the Page '%s'. Please contact the adminstrator.") % rel_path)
def unavailable_msg_page(request, rel_path):
# TODO: Add translation for this message
messages.info(request, _("Unavailable: The Page '%s' is not available. Create it or follow a valid link, please.") % rel_path)