Hi,

  I've a model something like this:

class Article ( models.Model ):

   text = models.TextField ()
   lasteditedby = models.ForeignKey ( User )
   whenedited = models.DateTimeField ( default = datetime.datetime.now() )


class Topic ( models.Model ):

   name = models.CharField ( max_length = 1024 )
   article = models.ForeignKey ( Article )


class Sections ( models.Model ):

   name = models.CharField ( max_length = 1024 )
   topic = models.ManyToManyField ( Topic )


Now If I do, Topic.objects.all().order_by("-id")[:10] it gives me all
the recent topics, I need to know which section this topic belong to.
How can I do that?

Thanks

-- 
Shamail Tayyab
Blog: http://shamail.in/blog

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to