15
|
1 |
import sys
|
|
2 |
from datetime import datetime
|
|
3 |
|
|
4 |
from django.core.management.base import NoArgsCommand
|
|
5 |
|
|
6 |
from offline.event.models import Event
|
|
7 |
from offline.quiz.models import QuestionBank
|
|
8 |
|
|
9 |
def seed_db():
|
|
10 |
ev = Event()
|
|
11 |
ev.title = "Some Workshop"
|
|
12 |
ev.start_date = datetime.now()
|
|
13 |
ev.stop_date = datetime.now()
|
|
14 |
ev.quiz_status = '11'
|
|
15 |
ev.save()
|
|
16 |
|
|
17 |
class Command(NoArgsCommand):
|
|
18 |
|
|
19 |
def handle_noargs(self, **options):
|
|
20 |
""" Just copied the code from seed_db.py """
|
|
21 |
|
|
22 |
seed_db()
|