Hello,

I wrote a model which is not abstract, and from which a few
specialized classes derive:

| class Action( Model ):
|     item = ForeignKey( Item )
|     # A few other properties
|
| class Move( Action ):
|     class Meta:
|         proxy = True
|
| class Pick( Action )
|     class Meta:
|         proxy = True
|

(the foreign key to Item may seem strange, but Actions change their
properties during the life cycle of an Item)

My Action could be abstract, but I'd like to be able to select generic
Actions. Am I correct in creating a non-abstract model for this
purpose?

My derived Actions add specialized interactions with other models, but
I don't need more fields and I want to avoid changing the db when
adding behaviours. Am I correct in creating proxy models for those
specialized Actions?

Consequently, my problem is that I can't restore a Move from an Action
once saved.

I tried to use ContentType, but its manager refers to the base model
and loses the proxy.

I could use a factory to instantiate the derived Actions, but fiddling
with dynamic import doesn't sound right and portable.

There is something I am missing here. Any tip?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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