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