mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 06:39:51 +03:00
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Senpai-YoloBot <41898282+github-actions[bot]@users.noreply.github.com>
18 lines
449 B
Python
18 lines
449 B
Python
import os
|
|
import django
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'aniscrap_core.settings')
|
|
django.setup()
|
|
|
|
from users.models import Badge
|
|
|
|
badges = [
|
|
{'name': 'Critic', 'slug': 'critic', 'description': 'Test'},
|
|
{'name': 'Collector', 'slug': 'collector', 'description': 'Test'}
|
|
]
|
|
|
|
for b in badges:
|
|
Badge.objects.get_or_create(slug=b['slug'], defaults={'name': b['name'], 'description': b['description']})
|
|
|
|
print("Badges created")
|