# in views.py
def start(request):
initial_dictionary = {"abc":"abc"}
request.session['123'] = "xyz"
return initial_dictionary
def post开发者_C百科(request):
dictionary = start(request)
return render_to_response("blah")
This is OOP. Will this make changes to "request", and will the session be set? (request is passed as a pointer)
The session object comes from the HttpRequest
, so if that's what gets passed into the function as request
then what you have should work.
精彩评论