Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Malcolm Tredinnick
On Thu, 2007-10-25 at 15:17 +, bramble wrote: > On Oct 25, 10:38 am, Dan Ellis <[EMAIL PROTECTED]> wrote: [...] > It would be trivial to just add a short sentence in the tutorial > saying something like, "Behind the scenes, Django sets things up such > that you automatically get instance varia

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Dan Ellis
On Oct 25, 4:17 pm, bramble <[EMAIL PROTECTED]> wrote: > It would be trivial to just add a short sentence in the tutorial > saying something like, "Behind the scenes, Django sets things up such > that you automatically get instance variables for each of the class > variables you've set up.". Smal

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread bramble
On Oct 25, 10:38 am, Dan Ellis <[EMAIL PROTECTED]> wrote: > Yeah, Django is doing some magic using a metaclass for Model > (ModelBase, which is badly named IMO, as it isn't Model's base class). > Most of the magic is in django.db.models.base. > > The documentation tells you how to /use/ the model

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Dan Ellis
Yeah, Django is doing some magic using a metaclass for Model (ModelBase, which is badly named IMO, as it isn't Model's base class). Most of the magic is in django.db.models.base. The documentation tells you how to /use/ the model API, though. I don't think there's any need for the docs to explain

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Thomas Guettler
Am Donnerstag, 25. Oktober 2007 15:42 schrieb bramble: > It looks to me that even though you set up class attributes in your > models, when you *use* your models in your code, you access them as if > they were instance attributes. > > Nowhere in the tutorials or the model or db-api docs is this >

crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread bramble
It looks to me that even though you set up class attributes in your models, when you *use* your models in your code, you access them as if they were instance attributes. Nowhere in the tutorials or the model or db-api docs is this mentioned. Unless I'm misunderstanding it, evidently, Django is d