Well, it turns out this would've been possible even without #4144, but
now that it's in CVS, I wrote up a wiki article[1] on dynamic models,
which should give you some clues on how to dynamically generate a
model. For this case, it would suffice to use the generic approach
listed there, created th
Sandro,
I'm not sure #4144 would help.
However, I think there are limits to what you can do with python
descriptors, and thus Django models. At the risk of giving up all the
niceties of having an actual SQL field, can you do what you need by
pickling dictionaries? If you really wanted to be lazy/
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 (UserPro
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.OneToOne
hi,
i'd like to dinamycally add fields to a model (UserProfile) so that
it gets populated of all the field needed by each application.
Any idea of how to accomplish this? I first try that cannot work
would have been:
--~--~-~--~~~---~--~~
You receive
5 matches
Mail list logo