I have a function like this:
def upload_file(request):
if request.method == 'POST':
# session_name = request.POST['session']
url = request.POST['hostname']
username = request.POST['username']
password = request.POST['password']
This function gets the hostname, username and password from a form and store in a respective variable. I want to use the variables url, username and password in another function:
def another_function():
print url, username, password
What's the right way to do this? I could make upload_file return the variable and use that but I guess it can be done only with one variable.