[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:
>
>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
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
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
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)
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
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
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
7 matches
Mail list logo