From d9ac52d332a0529a675a5c5892e03324591a49ff Mon Sep 17 00:00:00 2001
From: Alejandro Brunacci
Date: Wed, 24 Jan 2018 13:22:28 -0300
Subject: [PATCH 1/7] Fix requirements.txt: Setting django version to 1.9 and
pillow to 5.0.0
---
requirements.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 67a04d6..64f06b0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
-django
-pillow
+django==1.9
+pillow==5.0.0
\ No newline at end of file
From 74e34df1e1691bef2f0eb81e5ab2fdb85e814bba Mon Sep 17 00:00:00 2001
From: Sigurd Gartmann
Date: Wed, 14 Feb 2018 23:44:19 +0100
Subject: [PATCH 2/7] Upgrade to Django 2.0(.2)
Changes needed since url library has been rewritten in this version of
Django.
---
django-jquery-file-upload/urls.py | 8 ++++----
fileupload/serialize.py | 2 +-
fileupload/urls.py | 16 ++++++++--------
requirements.txt | 4 ++--
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/django-jquery-file-upload/urls.py b/django-jquery-file-upload/urls.py
index 53f314a..8f26ec4 100644
--- a/django-jquery-file-upload/urls.py
+++ b/django-jquery-file-upload/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls import include, url
+from django.urls import include, path
from django.http import HttpResponseRedirect
from django.conf import settings
@@ -7,9 +7,9 @@
admin.autodiscover()
urlpatterns = [
- url(r'^$', lambda x: HttpResponseRedirect('/upload/new/')),
- url(r'^upload/', include('fileupload.urls')),
- url(r'^admin/', include(admin.site.urls)),
+ path('', lambda x: HttpResponseRedirect('/upload/new/')),
+ path('upload/', include('fileupload.urls')),
+ path('admin/', admin.site.urls),
]
if settings.DEBUG:
diff --git a/fileupload/serialize.py b/fileupload/serialize.py
index 4494e79..96749af 100644
--- a/fileupload/serialize.py
+++ b/fileupload/serialize.py
@@ -1,7 +1,7 @@
# encoding: utf-8
import mimetypes
import re
-from django.core.urlresolvers import reverse
+from django.urls import reverse
def order_name(name):
diff --git a/fileupload/urls.py b/fileupload/urls.py
index 7a52c3a..1dbfa7b 100644
--- a/fileupload/urls.py
+++ b/fileupload/urls.py
@@ -1,5 +1,5 @@
# encoding: utf-8
-from django.conf.urls import url
+from django.urls import path
from fileupload.views import (
BasicVersionCreateView, BasicPlusVersionCreateView,
jQueryVersionCreateView, AngularVersionCreateView,
@@ -7,11 +7,11 @@
)
urlpatterns = [
- url(r'^basic/$', BasicVersionCreateView.as_view(), name='upload-basic'),
- url(r'^basic/plus/$', BasicPlusVersionCreateView.as_view(), name='upload-basic-plus'),
- url(r'^new/$', PictureCreateView.as_view(), name='upload-new'),
- url(r'^angular/$', AngularVersionCreateView.as_view(), name='upload-angular'),
- url(r'^jquery-ui/$', jQueryVersionCreateView.as_view(), name='upload-jquery'),
- url(r'^delete/(?P\d+)$', PictureDeleteView.as_view(), name='upload-delete'),
- url(r'^view/$', PictureListView.as_view(), name='upload-view'),
+ path('basic/', BasicVersionCreateView.as_view(), name='upload-basic'),
+ path('basic/plus/', BasicPlusVersionCreateView.as_view(), name='upload-basic-plus'),
+ path('new/', PictureCreateView.as_view(), name='upload-new'),
+ path('angular/', AngularVersionCreateView.as_view(), name='upload-angular'),
+ path('jquery-ui/', jQueryVersionCreateView.as_view(), name='upload-jquery'),
+ path('delete/', PictureDeleteView.as_view(), name='upload-delete'),
+ path('view/', PictureListView.as_view(), name='upload-view'),
]
diff --git a/requirements.txt b/requirements.txt
index 64f06b0..8e1f459 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
-django==1.9
-pillow==5.0.0
\ No newline at end of file
+django>=2.0.2,<2.0.99
+pillow==5.0.0
From 04efb0ce040a3acf4ac16827bcd48a598fd0280d Mon Sep 17 00:00:00 2001
From: Sigurd Gartmann
Date: Wed, 14 Feb 2018 23:51:59 +0100
Subject: [PATCH 3/7] Upgrade README after upgrading to Django 2 and Python 3
---
README.md | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index d28dde2..3498b31 100644
--- a/README.md
+++ b/README.md
@@ -32,10 +32,17 @@ fileupload/models.py as commented in the file.
Installation
============
-* pip install -r requirements.txt (will install django and pillow)
-* python manage.py migrate
-* python manage.py runserver
-* go to localhost:8000/upload/new/ and upload some files
+I recommend to install this within a virtualenv.
+
+```sh
+virtualenv -p python3 venv
+source venv/bin/activate
+pip install -r requirements.txt
+./manage.py migrate
+./manage.py runserver
+```
+
+And then go to localhost:8000 and try to upload some files.
License
=======
From f487163413fdf5c3e70240f71e51ba91db21289b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 22 Oct 2019 20:41:44 +0000
Subject: [PATCH 4/7] Bump pillow from 5.0.0 to 6.2.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 5.0.0 to 6.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/5.0.0...6.2.0)
Signed-off-by: dependabot[bot]
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 8e1f459..ee31b04 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
django>=2.0.2,<2.0.99
-pillow==5.0.0
+pillow==6.2.0
From eb4d548d39c5b5f9aa7093447898cfde039d2339 Mon Sep 17 00:00:00 2001
From: Matt Chatterley
Date: Thu, 30 Apr 2020 09:05:27 +0100
Subject: [PATCH 5/7] Add trailing slashes for newer versions of Django
(default settings)
---
.../templates/fileupload/picture_basic_form.html | 10 +++++-----
.../templates/fileupload/picture_basicplus_form.html | 10 +++++-----
fileupload/templates/fileupload/picture_form.html | 8 ++++----
.../templates/fileupload/picture_jquery_form.html | 10 +++++-----
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/fileupload/templates/fileupload/picture_basic_form.html b/fileupload/templates/fileupload/picture_basic_form.html
index 69993d0..98ab055 100644
--- a/fileupload/templates/fileupload/picture_basic_form.html
+++ b/fileupload/templates/fileupload/picture_basic_form.html
@@ -38,11 +38,11 @@
Django jQuery File Upload Demo
Basic version
diff --git a/fileupload/templates/fileupload/picture_basicplus_form.html b/fileupload/templates/fileupload/picture_basicplus_form.html
index 2d2069e..e52d1fd 100644
--- a/fileupload/templates/fileupload/picture_basicplus_form.html
+++ b/fileupload/templates/fileupload/picture_basicplus_form.html
@@ -38,11 +38,11 @@
Django jQuery File Upload Demo
Basic Plus version
diff --git a/fileupload/templates/fileupload/picture_form.html b/fileupload/templates/fileupload/picture_form.html
index d77a925..1f352e8 100644
--- a/fileupload/templates/fileupload/picture_form.html
+++ b/fileupload/templates/fileupload/picture_form.html
@@ -6,11 +6,11 @@
Django jQuery File Upload Demo
Basic Plus UI version
diff --git a/fileupload/templates/fileupload/picture_jquery_form.html b/fileupload/templates/fileupload/picture_jquery_form.html
index 0332c31..3de8b18 100644
--- a/fileupload/templates/fileupload/picture_jquery_form.html
+++ b/fileupload/templates/fileupload/picture_jquery_form.html
@@ -82,11 +82,11 @@ jQuery UI version
File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery UI.
From 8a5745402b5182670b7991097b522942f04b8322 Mon Sep 17 00:00:00 2001
From: Sigurd Gartmann
Date: Tue, 11 Aug 2020 23:07:11 +0200
Subject: [PATCH 6/7] Update django dependency to newer django 2
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index ee31b04..05a617c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
-django>=2.0.2,<2.0.99
+django>=2.2.13,<2.0.99
pillow==6.2.0
From 0f819ad5ae763e895a03c77a083996168d37100c Mon Sep 17 00:00:00 2001
From: Sigurd Gartmann
Date: Tue, 11 Aug 2020 23:08:38 +0200
Subject: [PATCH 7/7] Update pillow dependency
Not tested. Will archive repository soon.
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 05a617c..c87429b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
django>=2.2.13,<2.0.99
-pillow==6.2.0
+pillow>=7.1.0