testappproj/testapp/models.py~
changeset 0 0b061d58aea3
equal deleted inserted replaced
-1:000000000000 0:0b061d58aea3
       
     1 from django.db import models
       
     2 
       
     3 
       
     4 class Problem(models.Model):
       
     5   name = models.CharField(blank=False,max_length=255)
       
     6 #  categories = models.()
       
     7   description = models.CharField(max_length=255)
       
     8   examples = models.CharField(max_length=255)
       
     9   skeleton = models.CharField(max_length=255)
       
    10   tests = models.CharField(max_length=255)
       
    11   other_tests = models.CharField(max_length=255)
       
    12   solution = models.CharField(max_length=255)
       
    13   author = models.CharField(max_length=255)
       
    14   created = models.DateTimeField()
       
    15   modified = models.DateTimeField()
       
    16 
       
    17 
       
    18 class ProblemUser(models.Model):
       
    19   problem = models.ForeignKey('Problem')
       
    20   # user = models.UserProperty()
       
    21   solution = models.CharField(max_length=255)
       
    22   solved = models.BooleanField()
       
    23   def classname(self):
       
    24     return "ProblemUser"
       
    25