django-fobi/examples/simple/foo/management/commands/fobi_create_test_data.py
Artur Barseghyan f315c9bcc6 initial
2014-10-11 05:54:24 +02:00

16 lines
493 B
Python

from django.core.management.base import BaseCommand
from fobi.tests.helpers import (
get_or_create_admin_user, create_form_with_entries
)
class Command(BaseCommand):
def handle(self, *args, **options):
"""
Creates test data to fill the dashboard with.
"""
try:
user = creaget_or_create_admin_userte_admin_user()
create_form_with_entries(user, create_entries_if_form_exist=False)
except Exception as e:
pass