I have added an additional temp.save.
First I create the Profile with the mandatory attributes then I add the
optional ones if they exist.
This seems to work, I mean I do not get an error message when clicking
on submit.
My problem is now that even if I multi select localisation I only save
the last selected one.
Do you have an idea on how to solve this?


============================
my manipulator "save" function
=========================

    def save(self, new_data, current_user):

        temp = Profile(
            user=current_user,
            pseudo=new_data['pseudo'],

#want_to_publised_personal_info=new_data['want_to_publised_personal_info'],

memberShipLevel=memberships.get_object(pk=new_data['memberShipLevel']),
            want_to_publised_personal_info=False,
            is_default_profile=True
        )
        temp.save()
        if new_data['localisation']:
            temp.set_localisation(new_data['localisation'])
        if new_data['gender']:
            temp.gender=
genders.get_object(id__exact=new_data['gender'])
        temp.address = new_data['address']
        temp.phonenumber = new_data['phonenumber']
        if new_data['want_to_publised_personal_info']:
            temp.want_to_publised_personal_info=
new_data['want_to_publised_personal_info']
        temp.is_default_profile=True
        temp.save()
        return temp


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to