Re: Attributes for ManyToMany

2007-07-06 Thread patrick k.

here it is:
http://code.djangoproject.com/browser/django/trunk/tests/modeltests/ 
m2m_intermediary/models.py

Am 06.07.2007 um 11:03 schrieb Thomas Güttler:

>
> Hi,
>
> How can you add attributes to ManyToMany Relations?
>
> Given the example:
> http://www.djangoproject.com/documentation/models/many_to_many/
>
> Publication -- N:M -- Article
>
> How can you store the page number of the published article?
>
>  Thomas
>
> -- 
> Thomas Güttler, http://www.tbz-pariv.de/
> Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917
> TBZ-PARIV GmbH  Geschäftsführer: Dr. Reiner Wohlgemuth
> Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Attributes for ManyToMany

2007-07-06 Thread patrick k.

usually, if you want to have additional fields with a m2m-relation  
you have to use an intermediary table with a foreignkey (e.g. with  
edit-inline).
if this page is working, there´s an example:
http://www.djangoproject.com/documentation/models/

howerver, if you want to have the page-number for an article you may  
just add a field "page_number" to your article-model.

patrick

Am 06.07.2007 um 11:03 schrieb Thomas Güttler:

>
> Hi,
>
> How can you add attributes to ManyToMany Relations?
>
> Given the example:
> http://www.djangoproject.com/documentation/models/many_to_many/
>
> Publication -- N:M -- Article
>
> How can you store the page number of the published article?
>
>  Thomas
>
> -- 
> Thomas Güttler, http://www.tbz-pariv.de/
> Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917
> TBZ-PARIV GmbH  Geschäftsführer: Dr. Reiner Wohlgemuth
> Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Attributes for ManyToMany

2007-07-06 Thread Thomas Güttler

Hi,

How can you add attributes to ManyToMany Relations?

Given the example:
http://www.djangoproject.com/documentation/models/many_to_many/

Publication -- N:M -- Article

How can you store the page number of the published article?

 Thomas

-- 
Thomas Güttler, http://www.tbz-pariv.de/ 
Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917
TBZ-PARIV GmbH  Geschäftsführer: Dr. Reiner Wohlgemuth
Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---