On 5 jan, 01:38, Daniel Roseman wrote:
> On Jan 4, 11:24 pm, Malcolm Tredinnick
> wrote:
>
>
>
> > On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
>
> > [...]
>
> > > I don't know why you say filtering Equipamento based on the value in
> > > Model 'seems to be not possible'. On the co
On 5 jan, 01:38, Daniel Roseman wrote:
> On Jan 4, 11:24 pm, Malcolm Tredinnick
> wrote:
>
>
>
> > On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
>
> > [...]
>
> > > I don't know why you say filtering Equipamento based on the value in
> > > Model 'seems to be not possible'. On the co
On Jan 4, 11:24 pm, Malcolm Tredinnick
wrote:
> On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
>
> [...]
>
> > I don't know why you say filtering Equipamento based on the value in
> > Model 'seems to be not possible'. On the contrary, it is perfectly
> > possible - that's the whole poin
On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
[...]
> I don't know why you say filtering Equipamento based on the value in
> Model 'seems to be not possible'. On the contrary, it is perfectly
> possible - that's the whole point of a relational database system. You
> want something like:
On Jan 4, 8:30 pm, Patrick wrote:
> Ok, I will rephrase that with a concrete example:
> I have those to models:
>
> class Modelo(models.Model):
> nome = models.CharField(max_length=10)
> manageable = models.BooleanField()
>
> class Equipamento(models.Model):
> modelo = models.ForeignK
http://docs.djangoproject.com/en/dev/topics/db/queries/#topics-db-queries
i would use .filter and .order_by
On Jan 4, 8:30 pm, Patrick wrote:
> Ok, I will rephrase that with a concrete example:
> I have those to models:
>
> class Modelo(models.Model):
> nome = models.CharField(max_length=10
Ok, I will rephrase that with a concrete example:
I have those to models:
class Modelo(models.Model):
nome = models.CharField(max_length=10)
manageable = models.BooleanField()
class Equipamento(models.Model):
modelo = models.ForeignKey(Modelo)
nome = models.CharField(max_length=2
Hello everybody.
Let's say i have the models Model1 and Model2. Model1 has a
BooleanField called Personalizabe. Model2 has a field named 'model1'
that is a ForeignKey to Model1.
Is there a way, through the admin page, to filter all the Model2
objects according to this Personalizable attribute?
8 matches
Mail list logo