You can set a temporary cookie variable in your browser.
For example, in Chrome, you can use the following or the Resources
tab on the Web Inspector:
- browse to website
- In browser URL bar, type:
javascript:document.cookie="my_app_who_am_i=itsa_me_mario"
and pull it back using some django:
request.COOKIES.get('my_app_who_am_i')
Or if you had sessions setup already on your web server, you could set the cookie only when your account logs in.
response = render_to_response(template_name, context)
response.set_cookie('my_app_who_am_i', 'itsa_me_mario')
return response