mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 06:00:11 +03:00
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
33 lines
845 B
Python
33 lines
845 B
Python
# Generated manually
|
|
|
|
from django.db import migrations
|
|
|
|
def seed_specific_genre_badges(apps, schema_editor):
|
|
Badge = apps.get_model('users', 'Badge')
|
|
Badge.objects.get_or_create(
|
|
slug='nightmare',
|
|
defaults={
|
|
'name': 'Nightmare',
|
|
'description': 'Watched 5 Horror anime.',
|
|
'icon_url': '/static/badges/nightmare.png'
|
|
}
|
|
)
|
|
Badge.objects.get_or_create(
|
|
slug='comedy-gold',
|
|
defaults={
|
|
'name': 'Comedy Gold',
|
|
'description': 'Watched 5 Comedy anime.',
|
|
'icon_url': '/static/badges/comedy_gold.png'
|
|
}
|
|
)
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('users', '0032_seed_tv_addict_and_ova_enthusiast'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(seed_specific_genre_badges),
|
|
]
|