Hi,

first of all I'm sorry if this argument has been discussed somewhere but
I cannot find any real example except the one for the user profile.

I'm trying to extend an existing model adding some fields.

It seems there's no "clean way" to this but creating a related model for
it (as per the user profile pattern [1]).

That's not what I want since I need the field to be part of the
going-to-be-extended model itself and not access it by something like

myfield = extendend_object.get_related().myfield


I tried by model inheritance [2] but when I try to register the model
that extends the original one I get

  File
"/home/simahawk/dev/django/lfs/dev1.1/parts/django/django/contrib/admin/sites.py",
line 78, in register
    raise AlreadyRegistered('The model %s is already registered' %
model.__name__)

The answer is obvious: the model is already registered.


Is there a "right" way to get this beside the "profile pattern"?

Thanks in advance for any pointers.


[1]
http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/

[2] http://docs.djangoproject.com/en/1.1/topics/db/models/#model-inheritance

-- 
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