On Jun 23, 11:40 pm, Micky Hulse <rgmi...@gmail.com> wrote:
> On Thu, Jun 23, 2011 at 2:17 PM, bruno desthuilliers
>
> <bruno.desthuilli...@gmail.com> wrote:
> > FWIW, I have been using model inheritance - abstract and concrete - in
> > half a dozen projects, with about 30 model subclasses in one of them,
> > and it JustWorks(tm).
>
> That sounds pretty sweet! :D

That's not. In fact it's rather ugly, but I had few other choice -
this is a mirroring of a Plone-based EDM system, so I have a base
"Content" class and one subclasses for each and every AT Content type
in the system... And then I'm using proxy models on top of this to get
something I can work with. Kind of a mess, but hey, it works.

> I would love to see some examples.

You wouldn't like to see this one, believe me. It's a real
monstruosity.

> I have been using abstract models for some of my projects... I find
> them extremely useful

So do I. Being able to factor out a subset of related fields and
behaviours can greatly simplify some stuff.

>
> https://gist.github.com/1043698
>
> It works for me... Of course, I am still a noobie to Python/Django, so
> may the feedback be kind. :: crosses fingers :: :D

You may be interested in the "auto_now" and "auto_now_add" arguments
to Date and DateTime fields.




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to