# Generated by Django 3.2.7 on 2021-10-05 21:14

from django.db import migrations


def load_newscategory (apps, schema_editor):
    Category = apps.get_model ('news', 'Category')
    category_music = Category (Name = 'Muzika', valid_from='2021-10-01', valid_to='2022-10-01', approved=True, status=True )
    category_music.save()
    category_movie = Category(Name='Film', valid_from='2021-10-01', valid_to='2022-10-01', approved=True, status=True)
    category_movie.save()
    category_exhibit = Category(Name='Izlozba', valid_from='2021-10-01', valid_to='2022-10-01', approved=True, status=True)
    category_exhibit.save()


def delete_newscategory(apps, schema_editor):
    Age = apps.get_model("news", "Category")
    Age.objects.all().delete()


class Migration(migrations.Migration):

    dependencies = [
        ('news', '0004_auto_20210930_2307'),
    ]

    operations = [
        migrations.RunPython(load_newscategory, delete_newscategory),
    ]
