Olivier Guilyardi wrote:
> I'm still a python newbie, but it seems to me that there could be a way to
> modify the model definition before Django knows about it:

Okay, I found the Field.contribute_to_class() method which seems to work just
fine. I'm calling it right after my model class declaration, in models.py:

test_field = models.CharField(maxlength=250)
test_field.contribute_to_class(MediaItem, 'test_field')

This should allow me to load dynamical fields definitions from an external
configuration file.

But is it ok to use contribute_to_class() directly?
May this break with future Django releases?

Regards

--
  Olivier - http://www.samalyse.com

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

Reply via email to