diff --git a/aleksis/apps/mensa/settings.py b/aleksis/apps/mensa/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..4198d3cf7bec319ee93eacb50b4e37222f017ad1 --- /dev/null +++ b/aleksis/apps/mensa/settings.py @@ -0,0 +1,3 @@ +import os + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/aleksis/apps/mensa/views.py b/aleksis/apps/mensa/views.py index 39124eef939d976b7f27316ccb31fb22f40ba884..e615c54d9ad37f13dd2bd7e1a10f46a6fabd5921 100644 --- a/aleksis/apps/mensa/views.py +++ b/aleksis/apps/mensa/views.py @@ -8,7 +8,7 @@ from django.shortcuts import render, redirect from django.utils import timezone from .models import Menu -from django.conf import settings +from .settings import BASE_DIR from .forms import MenuUploadForm @@ -54,7 +54,7 @@ def return_pdf(filename): def return_default_pdf(): """Response the default PDF""" - return return_pdf(os.path.join(settings.BASE_DIR, "menu", "default.pdf")) + return return_pdf(os.path.join(BASE_DIR, "default.pdf")) def show_current(request):