GenericStackedInline max_num late binding before assigning ModelAdmin.inlines a value

2009-12-10 Thread Silvano
vance Silvano file: app1.admin.py class MyInline(generic.GenericStackedInline): extra = 3 model = MyModel1 file: app2.admin.py class MyAdmin2(admin.ModelAdmin): MyInline.max_num = 1 # Obviously this will be persistent throughout all the code inlines = [MyInline, ] file:

Re: Filtered choices list for a m2m field from an m2m field within another model.

2008-11-20 Thread Silvano
. Thanks - Silvan On Nov 20, 2:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-11-19 at 13:35 -0800, Silvano wrote: > > Dear all > > > I'm completely stuck with the following problem. > > > What I'm trying to accomplish is: I have an app

Filtered choices list for a m2m field from an m2m field within another model.

2008-11-19 Thread Silvano
Dear all I'm completely stuck with the following problem. What I'm trying to accomplish is: I have an app with the model "Project" and another model "Contacts". In "Contacts" I have a m2m field called "projects_involved" relating to the "Project" model which allows to select projects the contact