diff --git a/brutaldon/settings.py b/brutaldon/settings.py index dfb5080..1a444a0 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -127,3 +127,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static') # Sanitizer settings SANITIZER_ALLOWED_TAGS = ['a', 'p', 'img', 'br', 'i', 'strong'] SANITIZER_ALLOWED_ATTRIBUTES = ['href', 'src'] + +# File upload settings. +# Important: media will not work if you change this. +FILE_UPLOAD_HANDLERS = ["django.core.files.uploadhandler.TemporaryFileUploadHandler"] diff --git a/brutaldon/templates/main/post_partial.html b/brutaldon/templates/main/post_partial.html index 0a3544b..3dc5243 100644 --- a/brutaldon/templates/main/post_partial.html +++ b/brutaldon/templates/main/post_partial.html @@ -1,9 +1,9 @@ {% load widget_tweaks %} {% if reply %} -
+ {% else %} - + {% endif %} {% csrf_token %} @@ -32,6 +32,21 @@ + +
+ +
+ {% render_field form.media_file_1 %} +
+
+ {% render_field form.media_text_1 class+="input" placeholder="Describe attachment" %} +
+
+ +
+ {{ form.errors }} +
+