Verified Commit 604bf2bc authored by Jonathan Weth's avatar Jonathan Weth

Remove legacy message support

parent 00200533
......@@ -2,11 +2,6 @@
{% load msg_box %}
{% block content %}
{% if msg == "success" %}
{% msg_box "Der Speiseplan wurde erfolgreich hochgeladen." "success" "check_circle" %}
{% elif msg == "delete_success" %}
{% msg_box "Der Speiseplan wurde erfolgreich gelöscht." "success" "check_circle" %}
{% endif %}
<script type="text/javascript">
$('#alert_close').click(function () {
$("#alert_box").fadeOut("slow", function () {
......
......@@ -34,17 +34,17 @@ def upload(request):
@login_required
@permission_required("mensa.add_menu")
def delete(request, id):
# print(id)
Menu.objects.get(id=id).delete()
return redirect("menu_index_msg", msg="delete_success")
messages.success(request, _("The menu was deleted successfully."))
return redirect("menu_index")
@login_required
@permission_required("menu.add_menu")
def index(request, msg=None):
def index(request):
menus = Menu.objects.all().order_by("calendar_week", "year")
return render(request, 'mensa/index.html', {"msg": msg, "menus": menus})
return render(request, 'mensa/index.html', {"menus": menus})
def return_pdf(filename):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment