google-code-export / django-forum

Automatically exported from code.google.com/p/django-forum
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

file based sessions are not stored in windows enviornment #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using windows XP and Python with django
1. changed the SESSION_ENGINE to 'django.contrib.sessions.backends.file'
2. SESSION_FILE_PATH = 'd:/tmp'
3. In view.py defined 2 methods/views as follows

def show_login(request):
    request.session['test'] = "Hello World"
    return render_to_response('login.html')

def form_submit(request):
    return render_to_response('home.html', {'result' : request.session['test']})    

On click of test button click from login.html it will call form_submit view. 

It loads the login.html and also creates session file in d:/tmp but while
reading the session it throws following error on the browser 

KeyError at /form_submit
stack trace
#  C:\Python26\lib\site-packages\django\core\handlers\base.py  in get_response
response = callback(request, *callback_args, **callback_kwargs)

# D:\PythonSample\mysite\..\mysite\portal\views.py in form_submit
return render_to_response('home.html', {'result' : request.session['test']}) 

# C:\Python26\lib\site-packages\django\contrib\sessions\backends\base.py in
__getitem__
return self._session[key] 

I am using django version 1.1.1, OS Windows xp and python 2.6 

Please let me know what is wrong here or are there any other changes need
to be done for file based session. 

Original issue reported on code.google.com by Pradnya....@gmail.com on 24 Mar 2010 at 11:07

GoogleCodeExporter commented 9 years ago
Sorry; this is not the right place to get this problem fixed. This is the issue
tracker for the django-forum project, which requires an existing working Django
installation.

To help you get Django up and running in your environment I would suggest the
django-users mailing list; http://groups.google.com/group/django-users

Original comment by rwpoul...@gmail.com on 2 Apr 2010 at 6:52