On Apr 19, 3:29 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am worried about how to model the next scene (this is an example, but
> an appropriated one): In the model we have People, and there are
> different kind of people, let's say: Professors, Students and Other.
> Each Peopl
Kenneth Gonsalves escribió:
>
> On 21-Apr-08, at 8:15 PM, Michael wrote:
>
>> What about using the count() method on a filtered subset to get your
>> id?
>>
>> Eg:
>> p = People(type="S")
>> p.id = People.objects.filter(type=p.type).count() + 1
>
> I dont know what the context of this is, b
On 21-Apr-08, at 8:15 PM, Michael wrote:
> What about using the count() method on a filtered subset to get your
> id?
>
> Eg:
> p = People(type="S")
> p.id = People.objects.filter(type=p.type).count() + 1
I dont know what the context of this is, but this would only give the
id if you have
What about using the count() method on a filtered subset to get your
id?
Eg:
p = People(type="S")
p.id = People.objects.filter(type=p.type).count() + 1
Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
andy baxter escribió:
> Is there a strong reason why the count should depend on the type?
Yes, I am creating a system for a real state business where this code
schema is used for the different type of houses.
Juanjo
--
mi blog: http://www.juanjoconti.com.ar
--~--~-~--~~--
Juanjo Conti wrote:
> Hi all,
>
> I am worried about how to model the next scene (this is an example, but
> an appropriated one): In the model we have People, and there are
> different kind of people, let's say: Professors, Students and Other.
> Each People object has a 'type' attribute. Type c
6 matches
Mail list logo