Do you start from Ques model? What are your starting data?

Il giorno mercoledì 7 maggio 2014 15:24:38 UTC+2, Anushree ha scritto:
>
> I have the following models. I want to retrieve list of question banks 
> related to a particular subject. Is it possible to do without modifying the 
> existing data models?Thank you
> class Subject(models.Model):
> name = models.CharField(max_length = 255)
> desc = models.TextField(blank=True)
> def __unicode__(self):
> return self.name
>
> class QuestionBank(models.Model):
> name = models.CharField(max_length=255)
> desc = models.TextField()
> def __unicode__(self):
> return self.name
>
> class Ques(models.Model):
> content = models.TextField()
> ques_type = models.CharField(max_length = 1 , default= 'A')
> score = models.PositiveSmallIntegerField(max_length = 1 , default= 1)
> ques_bank = models.ForeignKey(QuestionBank)
> subject = models.ForeignKey(Subject)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f98ca810-27a1-45a2-a177-cef5ba365456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to