36 lines
890 B
Python
36 lines
890 B
Python
# Generated by Django 3.2.16 on 2024-01-05 10:44
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
from django.apps import apps
|
|
import uuid
|
|
|
|
|
|
def create_departments(app, schema_editor):
|
|
|
|
Department = apps.get_model("authentication", "Department")
|
|
|
|
data = [
|
|
{"title": "Development", "icon": None},
|
|
{"title": "Sales", "icon": None},
|
|
{"title": "Marketing", "icon": None},
|
|
{"title": "Management", "icon": None},
|
|
{"title": "Business Strategy", "icon": None},
|
|
]
|
|
|
|
for item in data:
|
|
priority = Department.objects.create(title=item["title"], icon=item["icon"])
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("authentication", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(create_departments)
|
|
]
|