Just filtering Ques model (imho)

--
Rafael E. Ferrero


2014-05-07 10:24 GMT-03:00 Anushree <[email protected]>:

> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/66442114-cda1-45c4-9320-1059c045e48a%40googlegroups.com<https://groups.google.com/d/msgid/django-users/66442114-cda1-45c4-9320-1059c045e48a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAJJc_8WPAZcJnfXND1VAdfASK31VuQ1HR1So%3DYykgxcSXEMSxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to