getting a list of values automatically

2005-12-18 Thread Kenneth Gonsalves
hi, i have the following models: class Power(meta.Model): name = meta.CharField(_("Power"),maxlength=50,unique=True) class META: admin = meta.Admin( list_display = ('name',), search_fields = ['name'],) def __repr__(self): return "%s" %(self.nam

Re: Adding features to several models

2005-12-18 Thread Eric Walstad
On Sunday 18 December 2005 06:23 am, Ferry Dave wrote: > Hi there, > > I'm new to django and like it quite much, but have troubles with some > aspects of it. > > I'd like to write a base class with specific features for (almost) every > model in my app. It should provide several features, like db-

Re: list_display and ForeignForeignKey

2005-12-18 Thread [EMAIL PROTECTED]
Thank you a lot. Somehow I did not try the no-parenthesis notation nor did I use custom methods, for no particular reason...

Re: Adding features to several models

2005-12-18 Thread Adrian Holovaty
On 12/18/05, Ferry Dave <[EMAIL PROTECTED]> wrote: > I'd like to write a base class with specific features for (almost) every > model in my app. It should provide several features, like db-fields for > "hidden", "show after date" with meta.admin configuration and modified > X_get_list-functions i

Adding features to several models

2005-12-18 Thread Ferry Dave
Hi there, I'm new to django and like it quite much, but have troubles with some aspects of it. I'd like to write a base class with specific features for (almost) every model in my app. It should provide several features, like db-fields for "hidden", "show after date" with meta.admin configura

Re: php, mod_python postgresql conflict?

2005-12-18 Thread Burhan
What environment have you seen this problem? I am running mod_php, mod_python and MySQL (and PostgreSQL) all on one server with Apache2 -- haven't run into your issue.

Re: check constraints

2005-12-18 Thread Kenneth Gonsalves
On Sunday 18 Dec 2005 12:49 am, Adrian Holovaty wrote: > On 12/17/05, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > can you add check constraints in a model, and if so, how? > > There's no way to add constraints to the generated CREATE TABLE > SQL automatically, but you can just hand-edit the o