diff --git a/.gitignore b/.gitignore
index c3f0171..bce8317 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ __pycache__
settings.py
migrations
+promo_uploads
diff --git a/selfserv/jinja2.py b/selfserv/jinja2.py
index 01ff1c2..8e4392c 100644
--- a/selfserv/jinja2.py
+++ b/selfserv/jinja2.py
@@ -18,6 +18,7 @@ import markdown
from django.contrib.staticfiles.storage import staticfiles_storage
+from django.conf import settings
from django.urls import reverse
from django.utils import timezone
@@ -32,6 +33,7 @@ def environment(**options):
'localtime': lambda dt: timezone.localtime(dt).strftime('%Y-%m-%d %H:%M'),
'static': staticfiles_storage.url,
'url': reverse,
+ 'MEDIA_URL': settings.MEDIA_URL,
})
env.filters.update({
'markdown': lambda x: Markup(markdown.markdown(x))
diff --git a/selfserv/urls.py b/selfserv/urls.py
index 1b0171d..8cf182e 100644
--- a/selfserv/urls.py
+++ b/selfserv/urls.py
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see