Hi!
I am trying to understand how to use filters in django.
I have following models:
class Section(models.Model):
section = models.CharField(max_length=200, unique=True)
name = models.CharField(max_length=200, blank = True)
category = models.ForeignKey(Category, blank=True)
public = models.BooleanField()
def __unicode__(self):
return u"%s" %(self.section)
class Article (models.Model):
is_published = models.BooleanField(help_text= u"Необходимо
отметить для того что б статья стала опубликованой на сайте")
author = models.CharField(max_length = 150, help_text = u"Автор.
Использовать только настоящие имена")
title = models.CharField(max_length = 200, help_text= u"Заголовок статьи")
section = models.ForeignKey(Section)
Can you please suggest me a way to can get a list of articles where
section public attribute is true?
Thanks,
Oleg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---