]> git.p6c8.net - pcdenotes.git/commitdiff
Added "django-filebrowser-no-grappelli" as a upload management tool
authorPatrick Canterino <patrick@patrick-canterino.de>
Mon, 28 Feb 2022 10:58:15 +0000 (11:58 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Mon, 28 Feb 2022 10:58:15 +0000 (11:58 +0100)
.gitignore
media/uploads/.gitkeep [new file with mode: 0644]
pcdenotes/settings.py
pcdenotes/urls.py
requirements.txt

index 7871bf94ecabf283aa7a137cb6fa5a58127faf9f..aa59b81df2876c9d2f911efc6ba442af4c85a5ab 100644 (file)
@@ -4,3 +4,6 @@
 .venv-old
 __pycache__
 db.sqlite3
 .venv-old
 __pycache__
 db.sqlite3
+media/uploads/*
+!media/uploads/.gitkeep
+media/_versions
\ No newline at end of file
diff --git a/media/uploads/.gitkeep b/media/uploads/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
index 1c79c5c97d42cb62f246e8aef23214b3ac08135f..6225f2fe121f5778b3844bd6848fed5efb8d5d44 100644 (file)
@@ -43,6 +43,7 @@ INSTALLED_APPS = [
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
+    'filebrowser',
     'notes',
     'notes.templatetags.notes_extras'
 ]
     'notes',
     'notes.templatetags.notes_extras'
 ]
@@ -139,4 +140,7 @@ STATICFILES_DIRS = [BASE_DIR / 'notes/static']
 
 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
 
 
 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
 
+MEDIA_URL = '/media/'
+MEDIA_ROOT = BASE_DIR / 'media'
+
 NOTES_PER_PAGE = 5
\ No newline at end of file
 NOTES_PER_PAGE = 5
\ No newline at end of file
index 4832ebe6a5bf534acf03e425a9d9465309a9aa7e..5685b5dbe8161e803c066848245e4d74446f92f2 100644 (file)
@@ -16,7 +16,10 @@ Including another URLconf
 from django.contrib import admin
 from django.urls import path, include
 
 from django.contrib import admin
 from django.urls import path, include
 
+from filebrowser.sites import site
+
 urlpatterns = [
 urlpatterns = [
+    path('admin/filebrowser/', site.urls),
     path('admin/', admin.site.urls),
     path('', include('notes.urls')),
 ]
     path('admin/', admin.site.urls),
     path('', include('notes.urls')),
 ]
index 9f595996e02ca2ef7e2be523a3eeb171389ee138..cbbe4edd9e8c928af49a5a8173714888b1058ed6 100644 (file)
@@ -1,10 +1,12 @@
 asgiref==3.5.0
 backports.zoneinfo==0.2.1
 Django==4.0.2
 asgiref==3.5.0
 backports.zoneinfo==0.2.1
 Django==4.0.2
+django-filebrowser-no-grappelli==4.0.0
 importlib-metadata==4.11.1
 Markdown==3.3.6
 mysqlclient==2.1.0
 packaging==21.3
 importlib-metadata==4.11.1
 Markdown==3.3.6
 mysqlclient==2.1.0
 packaging==21.3
+Pillow==9.0.1
 pyparsing==3.0.7
 python-dotenv==0.19.2
 pytz==2021.3
 pyparsing==3.0.7
 python-dotenv==0.19.2
 pytz==2021.3

patrick-canterino.de