File: polymorphic_create_test_data.py

package info (click to toggle)
django-polymorphic 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 892 kB
  • sloc: python: 6,784; javascript: 263; makefile: 137
file content (17 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
This module is a scratchpad for general development, testing & debugging
"""

from django.core.management import BaseCommand
from pexp.models import *


class Command(BaseCommand):
    help = ""

    def handle_noargs(self, **options):
        Project.objects.all().delete()
        o = Project.objects.create(topic="John's gathering")
        o = ArtProject.objects.create(topic="Sculpting with Tim", artist="T. Turner")
        o = ResearchProject.objects.create(topic="Swallow Aerodynamics", supervisor="Dr. Winter")
        print(Project.objects.all())