update:
I get the same error with the latest stable Django. Error originates
from the call to pickle:
pickle.dumps(form)
On 9 jul, 08:51, yuccaplant wrote:
> Hi all,
>
> When I try to put a form in session, I get pickle error:
>
> Can't pickle : it's not
> found as django.utils.functional.__proxy__
>
> My setup:
> google app engine
> django trunk svn
> appengine_utilities session library
> python 2.5.1 (Os X Leopard)
>
> Any ideas?
>
> thanks in advance,
>
> pieter
>
> My Code:
> --
> form = PersonForm(self.request.POST)
> # put submitted data in session
> self.session['form'] = form
> # validate
> if form.is_valid():
> person = form.getPerson()
> person.put()
> person.emailDetails()
> self.redirect(self.request.path)
>
> ***
> the form in question:
> ***
>
> class PersonForm(forms.Form):
> title = forms.CharField()
> first_name = forms.CharField()
> last_name = forms.CharField()
> phone_number = forms.CharField(required=False)
> mobile_number = forms.CharField(required=False)
> email = forms.EmailField()
>
> company_name = forms.CharField(required=False)
> address = forms.CharField(required=False, widget=forms.Textarea)
> vat_number = forms.CharField(required=False)
> remark = forms.CharField(required=False, widget=forms.Textarea)
>
> def getPerson(self):
> person = Person(
> title = self.cleaned_data['title'],
> first_name = self.cleaned_data['first_name'],
> last_name = self.cleaned_data['last_name'],
> email = self.cleaned_data['email'],
> phone_number = self.cleaned_data['phone_number'],
> mobile_number = self.cleaned_data['mobile_number'],
> is_vegetarian = self.cleaned_data['is_vegetarian'],
>
> company_name = self.cleaned_data['company_name'],
> address = self.cleaned_data['address'],
> vat_number = self.cleaned_data['vat_number'],
> remark = self.cleaned_data['remark'],
> )
> return person
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---