foreign key within a manytomany within a model in admin
12 views
Skip to first unread message
MikeKJ
unread,
Nov 7, 2013, 8:40:57 AM11/7/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Sorry didnt know how else to describe what I am trying to do
I have 3 models
Advice
AdviceLevel
Organisation
So the idea is:
An organisation can dispense more than 1 advice:
class Organsiation(models.Model): title = models.CharField(max_length=150) advice = models.ManyToManyField(Advice)
Ok BUT each advice subject within an organsiation needs to be graded as to a level capability 1 to 4 So in the model how can I effectively tie a foreign key to each advice selected in the ManyToMany field call?
Cheers for any enlightement
MikeKJ
unread,
Nov 7, 2013, 12:19:20 PM11/7/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Think this may be a solution:
Models: Advice, AdviceLevel, Organisation
class Organsiation(models.Model): title = models.CharField(max_length=150)