filtering pulldowns in django admin

2008-10-21 Thread Matt Berg
I realize there is probably a very simple solution for this but it has been bothering me. How do I filter a pulldown in the admin. If I have an inline form, for example, I want to be able to limit results in a pulldown to the parent object/form. Thanks for the help. Matt --~--~-~--~---

Re: problem with passing dict object to django template

2008-09-02 Thread Matt Berg
2, 3:06 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 2 sep, 20:22, Matt Berg <[EMAIL PROTECTED]> wrote: > > > Sorry. > > > Yes, in the template I do a loop... > > > for crop in crops > > Where do "crops" come from ? In your above

Re: problem with passing dict object to django template

2008-09-02 Thread Matt Berg
tied to the crop.id. Hope this helps clarify it. Thanks, Matt On Sep 2, 2:01 pm, David Zhou <[EMAIL PROTECTED]> wrote: > On Sep 2, 2008, at 1:34 PM, Matt Berg wrote: > > > In my template, I want to be able to iterate through the crops with > > info like this: >

problem with passing dict object to django template

2008-09-02 Thread Matt Berg
Still new to django and python and have been struggling with the following. Basically, I want to pass the following dict object to a django template. def crop_info(season,crops): ci = {} cd = {} dap_kg_dollar = 0 urea_kg_dollar = 0 seed_local_dollar = 0 seed_improved_doll

Re: Calling attributes from other models

2008-08-26 Thread Matt Berg
Norman, Great. I'll give this a shot. Thank you for your help. Matt On Aug 25, 12:18 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > Matt Berg wrote: > > I apologize, I realize this is probably documented somewhere. > > > Say I have 2 models. > >

Calling attributes from other models

2008-08-25 Thread Matt Berg
I apologize, I realize this is probably documented somewhere. Say I have 2 models. Artist and Album Album has a foreign key to Artist. I want to do a list_display of Albums something like this... list_display = ('album','release_date','artist') This works fine and displays th