mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
added preferred region setting and default
This commit is contained in:
parent
970734c5df
commit
90b4d05cd0
1 changed files with 22 additions and 0 deletions
22
core/migrations/0010_reload_additional_settings.py
Normal file
22
core/migrations/0010_reload_additional_settings.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 5.1.6 on 2025-03-01 14:01
|
||||
|
||||
from django.db import migrations
|
||||
from django.utils.text import slugify
|
||||
|
||||
def preload_core_settings(apps, schema_editor):
|
||||
CoreSettings = apps.get_model("core", "CoreSettings")
|
||||
CoreSettings.objects.create(
|
||||
key=slugify("Preferred Region"),
|
||||
name="Preferred Region",
|
||||
value="us",
|
||||
)
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0009_m3u_hash_settings'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(preload_core_settings),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue