Hello-
I am having the following problem:
I have a normal form within an html page (here is a shortened
version):
<form action="context_form/" method="post" class="contextForm">
<select name="clinical_setting" id="clinical_setting">
<option value="-1" id="-1" selected="true">------------</option>
{% for setting in context.form_options.clinical_settings %}
<option value="{{ setting.value }}">{{ setting.label }}</option>
{% endfor %}
</select>
<input type="submit" name="submit" id="normal_submit_button"
value="Next"/>
</form>

On submit, I have:
def context_form(request):
        if request.method == 'POST':
                user_context = createUserContextFromSubmittedForm(request)
                if user_context is not None:
                        user_context.start_common = True
                        user_context.end_common = False
                        user_context.start_chosen = False
                        user_context.end_chosen = False
                        sessionid = request.session.session_key
                        request.session.__setitem__("context", context)
                else:
                        print "-0--- ERROR"
                print "returning"
                #return render_to_response('asdfasdf.html')
                return HttpResponse("", mimetype='application/javascript')

The function gets to the return (because it prints "returning"), and
even when I take away the sessionid and request.session part, I still
get the following error:
PicklingError: Can't pickle <type 'function'>: attribute lookup
__builtin__.function failed


any ideas?

Thanks!
Clea

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to