26 lines
770 B
Python
26 lines
770 B
Python
# Generated by Django 2.2.19 on 2021-08-31 10:10
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations
|
|
|
|
|
|
def create_site_settings(apps, schema_editor):
|
|
SiteSettings = apps.get_model('data', 'SiteSettings')
|
|
site_settings = SiteSettings.objects.create()
|
|
if hasattr(settings, 'COMBO_INITIAL_LOGIN_PAGE_PATH'):
|
|
site_settings.initial_login_page_path = settings.COMBO_INITIAL_LOGIN_PAGE_PATH or ''
|
|
if hasattr(settings, 'COMBO_WELCOME_PAGE_PATH'):
|
|
site_settings.welcome_page_path = settings.COMBO_WELCOME_PAGE_PATH or ''
|
|
site_settings.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('data', '0049_sitesettings'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(create_site_settings),
|
|
]
|