Sending parameters from one function to another in

I want to send some paramters from one view function to another view function in my file. If i try to do so using redirect or reverse method i get a NoReverseMatch error. Should i be using Global varaibles to send data from one function to another, if so are global parameters safe to use (are global parameters shared for different users in django or each user gets it’s own copy of code)?

What are you trying to accomplish by doing this?

Remember, a view function is a function that takes in a request and returns a response, so views aren’t supposed to be communicating with each other like that.

I think i can achive the same things using sessions middleware to store the data.

Correct. You need some external data storage to retain data between invocation of views. Storing it in the user’s session is one such location. (Useful if the data is per-user.) If you have more global needs, where the data needs to be accessible by different users, then you’ll want to store it in your database.