From 81de10b70c85c5222b17d8c4358a8aa8812f2559 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 18 Nov 2022 08:28:15 -0700 Subject: Migration reset, start of docs, env vars --- core/migrations/0001_initial.py | 14 +++++++++++--- core/migrations/0002_alter_config_image.py | 28 ---------------------------- 2 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 core/migrations/0002_alter_config_image.py (limited to 'core/migrations') diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py index 2c4731f..900260f 100644 --- a/core/migrations/0001_initial.py +++ b/core/migrations/0001_initial.py @@ -1,16 +1,20 @@ -# Generated by Django 4.1.3 on 2022-11-16 21:23 +# Generated by Django 4.1.3 on 2022-11-18 17:49 + +import functools import django.db.models.deletion from django.conf import settings from django.db import migrations, models +import core.uploads + class Migration(migrations.Migration): initial = True dependencies = [ - ("users", "0002_identity_public_key_id"), + ("users", "0001_initial"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] @@ -32,7 +36,11 @@ class Migration(migrations.Migration): ( "image", models.ImageField( - blank=True, null=True, upload_to="config/%Y/%m/%d/" + blank=True, + null=True, + upload_to=functools.partial( + core.uploads.upload_namer, *("config",), **{} + ), ), ), ( diff --git a/core/migrations/0002_alter_config_image.py b/core/migrations/0002_alter_config_image.py deleted file mode 100644 index 86dcebb..0000000 --- a/core/migrations/0002_alter_config_image.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 4.1.3 on 2022-11-18 01:40 - -import functools - -from django.db import migrations, models - -import core.uploads - - -class Migration(migrations.Migration): - - dependencies = [ - ("core", "0001_initial"), - ] - - operations = [ - migrations.AlterField( - model_name="config", - name="image", - field=models.ImageField( - blank=True, - null=True, - upload_to=functools.partial( - core.uploads.upload_namer, *("config",), **{} - ), - ), - ), - ] -- cgit v1.2.3