html-over-websockets-with-d.../scripts/create_categories.py

9 lines
225 B
Python
Raw Normal View History

2021-11-12 13:21:37 +01:00
from app.website.models import Category
from faker import Faker
def run():
fake = Faker()
# 5 categories
for word in [fake.unique.sentence(nb_words=1)[0:-1] for i in range(5)]:
Category(name=word).save()