from django.core import meta from django.models.auth import User QUESTION_KINDS = ( (0, 'Multiple Choice'), (1, 'Fill in the Blank'), )
DATUM_KINDS = ( (0, 'Text'), (1, 'Possible Answer'), (2, 'Correct Answer'), (3, 'Explanation'), ) # Create your models here. class Subject(meta.Model): value = meta.CharField(maxlength=50) def __repr__(self): return self.value class META: admin = meta.Admin() class Question(meta.Model): author = meta.ForeignKey(User) lastModified = meta.DateTimeField() kind = meta.IntegerField(choices=QUESTION_KINDS) isVetted = meta.BooleanField() subject = meta.ManyToManyField(Subject) def __repr__(self): return "Question: " class META: admin = meta.Admin() class Datum(meta.Model): kind = meta.IntegerField(choices=DATUM_KINDS) numericValue = meta.IntegerField(blank=True, null=True) textValue = meta.TextField(blank=True) question = meta.ForeignKey(Question, edit_inline=meta.STACKED) def __repr__(self): return self.textValue; On Mar 17, 2006, at 11:06 PM, Kenneth Gonsalves wrote: > > On Saturday 18 Mar 2006 9:25 am, Todd O'Bryan wrote: >> Any idea what might be up? > > post/paste your models > > -- > regards > kg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---