From 4d34336f2a9a5cb1a6124b174d7e77c62b0afe9f Mon Sep 17 00:00:00 2001 From: godd0t Date: Wed, 10 May 2023 13:33:56 +0200 Subject: [PATCH] add default storage --- src/project_name/settings/prod.py | 3 +++ src/test_app/migrations/0001_initial.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/test_app/migrations/0001_initial.py diff --git a/src/project_name/settings/prod.py b/src/project_name/settings/prod.py index 595032e..2c6f2e1 100644 --- a/src/project_name/settings/prod.py +++ b/src/project_name/settings/prod.py @@ -1,6 +1,9 @@ from .base import * # noqa STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, "staticfiles": { "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", }, diff --git a/src/test_app/migrations/0001_initial.py b/src/test_app/migrations/0001_initial.py new file mode 100644 index 0000000..0ae6606 --- /dev/null +++ b/src/test_app/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.1 on 2023-05-10 11:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='TestModel', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('description', models.TextField()), + ('file', models.FileField(upload_to='test_app/files/')), + ], + ), + ]