Re: list_display and ForeignForeignKey

2005-12-17 Thread Robert Wittams
[EMAIL PROTECTED] wrote: > Please take a look at this: > > from django.core import meta > from django.models.core import sites > > class Group(meta.Model): > site = meta.ForeignKey(sites.Site) > > class Product(meta.Model): > group = meta.ForeignKey(Group) > class META: >

Re: list_display and ForeignForeignKey

2005-12-17 Thread hugo
>An option would be support for methods in list_display (if implemented) That is supported. You can put any method name of the object into list_display - at least if it is a parameterless method. So just define your method and put that into list_display. bye, Georg

list_display and ForeignForeignKey

2005-12-17 Thread [EMAIL PROTECTED]
Please take a look at this: from django.core import meta from django.models.core import sites class Group(meta.Model): site = meta.ForeignKey(sites.Site) class Product(meta.Model): group = meta.ForeignKey(Group) class META: admin = meta.Admin(list_display

Re: check constraints

2005-12-17 Thread Adrian Holovaty
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 output of "django-admin.py sql [app]" and add the constraints tha

Re: filters in admin-interface

2005-12-17 Thread patrick k
problem solved. > > i am trying to display a filter for a many-to-one relation. > problem is: the filter doesn´t show up. > > fragment of the model looks like this: > > class Project(meta.Model): > id = meta.AutoField('ID', primary_key=True) > title = meta.CharField("Title", maxlength=100)

filters in admin-interface

2005-12-17 Thread patrick k
i am trying to display a filter for a many-to-one relation. problem is: the filter doesn´t show up. fragment of the model looks like this: class Project(meta.Model): id = meta.AutoField('ID', primary_key=True) title = meta.CharField("Title", maxlength=100) user = meta.ForeignKey(auth.Us

check constraints

2005-12-17 Thread Kenneth Gonsalves
hi can you add check constraints in a model, and if so, how? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!