For reference.  My mistake is that I really have a ManyToMany relationship
and I used this
http://www.mc706.com/tip_trick_snippets/18/django-manytomany-inline-admin/
to solve the problem.

Thanks to Ryan McDevitt.




On Sat, Apr 25, 2015 at 3:11 PM, Timothy W. Cook <t...@mlhim.org> wrote:

> The usage of AdminInlines seems backwards to me.
>
> At least in the use case I have.
>
> I have two  models:
>
> DvInterval:
>     lower = models.CharField(max_length=110)
>     upper = models.CharField(max_length=110)
>     ...
>
>
>  ReferenceRange:
> ​  ​
> ​ ​   ...
>
> ​    data_range = models.ForeignKey(DvInterval)
>
>
>
> ​Since a ReferenceRange may have many DvIntervals defined I would like to
> be able to edit them on the ReferenceRange admin page in a StackedInline.
> ​
> Kind of makes sense, right?  Add the intervals for this range.  At least
> that is what my users want.
>
> But the functionality of inlines wants me to put the ReferenceRange(s) on
> the DvIntervals page.  Most intervals will only be on one ReferenceRange
> but a ReferenceRange may have several intervals.
>
> Where is my modeling mistake?
>
> Thanks.
>
>
>
>
>
>
> ============================================
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>


-- 

============================================
Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VBk%2BKnFEUiBsVZ-r32ZEW75K0b_RgqZHheBTY2ik%2BDtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • Admin Inlines Timothy W. Cook
    • Re: Admin Inlines Timothy W. Cook

Reply via email to