Adding a custom field for ManyToMany

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a custom field for ManyToMany

Eric-320

I seem to recall some documentation somewhere, but it appears I was
hallucinating because I can't find it again.

Is there a way to add  custom field in a Django ManyToMany
relationship? Example has two models, Article and Category. An Article
has a ManyToMany relationship to Categories. However, an article also
can be ranked differently in each category, so in the "Development"
category it might be rank 1, but in the "Internal" category might have
a NULL rank.

I assume I will have to do my own logic and work for this, correct?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Adding a custom field for ManyToMany

Ramiro Morales-2

Ceph,

On 10/10/06, Ceph <[hidden email]> wrote:

>
> I seem to recall some documentation somewhere, but it appears I was
> hallucinating because I can't find it again.
>
> Is there a way to add  custom field in a Django ManyToMany
> relationship? Example has two models, Article and Category. An Article
> has a ManyToMany relationship to Categories. However, an article also
> can be ranked differently in each category, so in the "Development"
> category it might be rank 1, but in the "Internal" category might have
> a NULL rank.
>
> I assume I will have to do my own logic and work for this, correct?
>

Maybe youa re talking about this example:?

http://www.djangoproject.com/documentation/models/m2m_intermediary/

Regards,

--
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---