Oops, I meant to say form here... > > The interesting part from the model is > > from django import forms > from hc.fields.photofield import PhotoField > from django.core import validators > from django.contrib.auth.models import User > from hc.users.models import UserProfile > > class EditAccountForm(forms.Manipulator): > def __init__(self): > self.fields = ( > PhotoField(field_name='avatar'), > ) > > def save(self, new_data, user): > p = UserProfile.objects.get(user=user.id) > p.avatar = new_data['avatar'] > p.save() > return u >
--~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---