I know if want you to store form information to the session during a submit you do it with the 'def post' in your view. However, I can not figure out how to store form information when a random link e.g. 'homepage'.
How would you go about storing form information when a user clicks away from the form?
To store information in the session, you don't really need to post, or submit some kind of form. You can do it anywhere, where you have request using session attribute.
the session is dict like object and you can save there any basic types (str, int, float) if you use django's basic configuration, like so:
also, please note that you may directly have no session accessible, since django won't automatically create session for you. in fact to resolve the issue you could "initialize" it, with:
request.session.save()
please take a look at official documentation.