Friday, February 24, 2012

Re: help needed with multiple profile images with UserProfile

On Fri, Feb 24, 2012 at 2:20 PM, richard <pullenjenna10@gmail.com> wrote:
> Hi, Am i doing this in the correct way?
> […]
>
> any help would be greatly appreciated.
>
> […]
>
> from .models import UserProfilePic
> class UserProfilePicForm(ModelForm):
>    class Meta:
>        model = UserProfilePic
>        fields = ('profilepic',)
>
> […]
>
>    form = UserProfilePicForm(instance=u.get_profile())


u.get_profile() returns a UserProfile. Your form definition says that
this form is for a UserProfilePic model.

Cheers

Tom

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

No comments:

Post a Comment