Re: Import error: Model based on another model

2008-09-18 Thread Gerard Petersen
Daniel, Thanx for the answer on code execution. As far as the import issue is concerned. I'll have a look at importing specifics. I wouldn't want you to have to dig through my code to find a syntactic typo ... :-) Regards, Gerard. Daniel Roseman wrote: > On Sep 16, 10:08 pm, Gerard Petersen

Re: Import error: Model based on another model

2008-09-16 Thread Daniel Roseman
On Sep 16, 10:08 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Daniel, > > Great one! Your suggested setup works, in the front-end that is. I have quite > some classes subclassed from ModelAdmin (including ProductAdmin), however the > "form = ProductForm" line breaks my app. I've tried severa

Re: Import error: Model based on another model

2008-09-16 Thread Gerard Petersen
Daniel, Great one! Your suggested setup works, in the front-end that is. I have quite some classes subclassed from ModelAdmin (including ProductAdmin), however the "form = ProductForm" line breaks my app. I've tried several import statements to get the droplist to work in the admin part. This

Re: Import error: Model based on another model

2008-09-15 Thread Daniel Roseman
On Sep 15, 9:34 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Daniel, > > I'm building an invoice system. The data relations are as follows: > > Customer -1toN-> Orders -1toN-> Products > > The products can have different tax levels which, during creation of an > order, get chosen by the user

Re: Import error: Model based on another model

2008-09-15 Thread Gerard Petersen
Daniel, I'm building an invoice system. The data relations are as follows: Customer -1toN-> Orders -1toN-> Products The products can have different tax levels which, during creation of an order, get chosen by the user from a drop downlist. As shown in my first email, a tax level value (e.g. 0

Re: Import error: Model based on another model

2008-09-13 Thread Daniel Roseman
On Sep 13, 10:56 am, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Daniel, > > > If you want a field that's populated with values from another model, > > you should use a ForeignKey. > > Is it then still possible to use filters and such, and keep it in the model > logic? > > Because the Meta model

Re: Import error: Model based on another model

2008-09-13 Thread Steve Holden
Gerard Petersen wrote: > Daniel, > >> If you want a field that's populated with values from another model, >> you should use a ForeignKey. > Is it then still possible to use filters and such, and keep it in the model > logic? > > Because the Meta model has these fields: 'attribute', 'value', 'd

Re: Import error: Model based on another model

2008-09-13 Thread Gerard Petersen
Daniel, > If you want a field that's populated with values from another model, > you should use a ForeignKey. Is it then still possible to use filters and such, and keep it in the model logic? Because the Meta model has these fields: 'attribute', 'value', 'display', 'description' And it's mor

Re: Import error: Model based on another model

2008-09-13 Thread Daniel Roseman
On Sep 13, 9:25 am, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Hi All, > > I need to create a field with a choice set that looks like this: > >     BTW_CHOICES = ( >         ('0.0', '0%'), >         ('6.0', '6%'), >         ('19.0', '19%'), >     ) > > This works as expected when using dropdown