Re: Model Field Subclass

2010-01-25 Thread Igor Rubinovich
Thanks for the comment Bill. I did define the profile myself :) and I already see this thing working in test :) On Jan 25, 5:10 pm, Bill Freeman wrote: > Just to be clear, who defined get_profile() on the user object?  If not you, > then it may not be returning an instance of your "UserProfile" m

Re: Model Field Subclass

2010-01-25 Thread Bill Freeman
Just to be clear, who defined get_profile() on the user object? If not you, then it may not be returning an instance of your "UserProfile" model, but some other model (e.g.; the pinax Profile app's Profile). That Profile model doesn't have your modified field. Because otherwise, I'd expect your

Re: Model Field Subclass

2010-01-25 Thread Igor
Ok, I've figured the answer myself - but maybe someone will find it useful... When retrieving an ImageField, Django doesn't return the field but rather the underlying ImageFieldFile. So say you have a custom ImageField like this: class Profile(models.Model) ... photo = models.Remo

Re: Model Field Subclass

2010-01-25 Thread Igor
Ok, I've figured the answer myself - but maybe someone will find it useful... When retrieving an ImageField, Django doesn't return the field but rather the underlying ImageFieldFile. So say you have a custom ImageField this: class Profile(models.Model) ... photo = models.ImageFiel