All checks were successful
Django Backend Validation / build (debian-latest, 3.10) (push) Successful in 14s
Django Backend Validation / build (debian-latest, 3.11) (push) Successful in 15s
Django Backend Validation / build (debian-latest, 3.12) (push) Successful in 15s
Django Backend Validation / build (ubuntu-latest, 3.10) (push) Successful in 14s
Django Backend Validation / build (ubuntu-latest, 3.11) (push) Successful in 17s
Django Backend Validation / build (ubuntu-latest, 3.12) (push) Successful in 16s
Signed-off-by: Jochen Mehlich <coding@jochenmehlich.de>
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
from django.db import migrations, models
|
|
|
|
from settings.models import settingsParameter
|
|
|
|
preloadData = [
|
|
{
|
|
"name": "openid_client_id",
|
|
"value": "",
|
|
"category": "openid"
|
|
},{
|
|
"name": "openid_client_secret",
|
|
"value": "",
|
|
"category": "openid"
|
|
},{
|
|
"name": "openid_autodiscoveryurl",
|
|
"value": "",
|
|
"category": "openid"
|
|
},{
|
|
"name": "openid_scopes",
|
|
"value": "",
|
|
"category": "openid"
|
|
},{
|
|
"name": "openid_group_attribute",
|
|
"value": "",
|
|
"category": "openid"
|
|
},{
|
|
"name": "openid_admin_group_name",
|
|
"value": "",
|
|
"category": "openid"
|
|
}
|
|
]
|
|
|
|
def create_datafields(apps, database_schema):
|
|
for datapoint in preloadData:
|
|
se = settingsParameter()
|
|
se.parameter_name = datapoint["name"]
|
|
se.parameter_value = datapoint["value"]
|
|
se.parameter_class = datapoint["category"]
|
|
se.save()
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('settings', '0002_remove_settingsparameter_id_and_more'),
|
|
]
|
|
operations = [
|
|
migrations.RunPython(create_datafields),
|
|
] |