16 lines
385 B
Python
16 lines
385 B
Python
from django.core.management import BaseCommand
|
|
|
|
from surveys.factories import SurveyFactory
|
|
from surveys.models import Survey
|
|
|
|
from .data.survey_data import sample_survey
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def handle(self, *args, **options):
|
|
Survey.objects.all().delete()
|
|
|
|
survey = SurveyFactory.create(data=sample_survey)
|
|
|
|
# todo: create more surveys randomly?
|