I know of one way of going about this, but it relies on a Django patch
(#4144) that hasn't been integrated yet. There are probably ways I'm
not aware of, though.

-Gul

On May 3, 9:49 am, sandro dentella <[EMAIL PROTECTED]> wrote:
> hi,
>
>    i'd like to dinamycally add fields to a model (UserProfile) so that
>    it gets populated wit all the field needed by each application.
>
>    Any idea of how to accomplish this? A first try that cannot work
>    would have been:
>
>    class UserProfile(models.Model):
>        user = models.OneToOneField(User)
>        for name, value in app_contrib_from_settings().iteritems():
>            setattr(self, name, value)
>
>    but 'self' is not availabe of course...
>    Any idea? (it's more a python question than django, I know...)
>
>     sandro
>     *:-)
>
> PS: sorry for the have way post...


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