Debian Codegraph @

example/pexp/management/commands/polymorphic_create_test_data.py

raw
1 """
2 This module is a scratchpad for general development, testing & debugging
3 """
4
5 from django.core.management import BaseCommand
6 from pexp.models import *
7
8
9 class Command(BaseCommand):
10 help = ""
11
12 def handle_noargs(self, **options):
13 Project.objects.all().delete()
14 o = Project.objects.create(topic="John's gathering")
15 o = ArtProject.objects.create(topic="Sculpting with Tim", artist="T. Turner")
16 o = ResearchProject.objects.create(topic="Swallow Aerodynamics", supervisor="Dr. Winter")
17 print(Project.objects.all())