I have simple code that I would like to import in each of my views:
form = DocumentForm()
user= request.user
test1 = request.session.get('test1')
....
context += {'form': form, 'test1':test1 ...}
I would like to know if there is a simple way to do this. I saw the doc: https://docs.djangoproject.com/en/1.2/ref/generic-views/
But I'm not sure to get how it works. Thank you for your help.