open a shell with ./manage.py shell

from models import *

fetch one of your Authors (one that has a job already)

dir(author)

that will list all the ways you can poke at it.
always useful


you should see some way to access the AuthorNewspaper directly from the
Author object

to display a whole page of these positions you can fetch them directlly

AuthorNewspaper.objects.all()

an.author an.newspaper an.date


-felix
http://crucial-systems.com



On Mon, Jan 12, 2009 at 11:35 AM, Asif <asifrahm...@gmail.com> wrote:

>
> I've created a few models that have m2m relationships with
> intermediary tables.  I'm storing some extra data in the fields of the
> intermediary tables.  For example, I have a model called Author and
> model called Newspaper that are related to each other through a model
> called AuthorNewspaper.  In AuthorNewspaper, I am storing the date for
> which that author joined the newspaper.
>
> I'd like to create a view that can display those dates and I can't
> seem to figure out a way to do it elegantly.  The only way I've
> figured out is by using the extra method to add a bunch SQL that
> includes the fields from the intermediary table.  Am I missing
> something really obvious?
>
> Thanks in advance for your help,
>
> Asif
>
> P.S. If you haven't figured out already, I'm a Django newbie.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
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