summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/apps.py3
-rw-r--r--core/migrations/0001_initial.py14
-rw-r--r--core/migrations/0002_alter_config_image.py28
-rw-r--r--core/models/config.py2
4 files changed, 12 insertions, 35 deletions
diff --git a/core/apps.py b/core/apps.py
index 54693d5..6098f6b 100644
--- a/core/apps.py
+++ b/core/apps.py
@@ -9,7 +9,4 @@ class CoreConfig(AppConfig):
name = "core"
def ready(self) -> None:
- from core.models import Config
-
- Config.system = Config.load_system()
jsonld.set_document_loader(builtin_document_loader)
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",), **{}
- ),
- ),
- ),
- ]
diff --git a/core/models/config.py b/core/models/config.py
index 2a27d2e..57d9e55 100644
--- a/core/models/config.py
+++ b/core/models/config.py
@@ -160,7 +160,7 @@ class Config(models.Model):
site_icon: UploadedImage = static("img/icon-128.png")
site_banner: UploadedImage = static("img/fjords-banner-600.jpg")
- signup_allowed: bool = False
+ signup_allowed: bool = True
signup_invite_only: bool = False
signup_text: str = ""