I should also add that when I created a new user, I could upload an image,
but two image fields showed up. I could only upload the image using one
field, but not the other.
On Saturday, 22 August 2015 16:32:35 UTC-7, Avery Laird wrote:
>
> Hello,
>
> I added an image field to the existing user profile to support profile
> images. It looks like this, in `myapp.models`:
>
> class UserProfile(models.Model):
> user = models.OneToOneField(User)
> image = FileField(verbose_name=_("Profile Picture"),
>
> upload_to=upload_to("theme.UserProfile.ProfilePicture", "picture"),
> format="Image", max_length=255, null=True,
> blank=True)
>
> class Meta:
> verbose_name = _("User Profile")
> verbose_name_plural = _("User Profiles")
>
> I added this setting to the `settings.py` file:
>
> AUTH_PROFILE_MODULE = "theme.UserProfile"
>
> `mezzanine.accounts` is installed, and I migrated the database. The image
> field shows up in the admin interface, and I can upload an image. but when
> I select it nothing happens. The javascript throws this error: `Uncaught
> TypeError: Cannot set property 'value' of null`. It seems to be thrown by
> this line:
>
> 16: input.value = FilePath;
>
> I couldn't find anything amiss in the js or the dom, can anyone see what
> I'm missing?
>
> Cheers!
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.