Django: Accessing request in forms.py clean function
Hi Stackoverflow people, In my clean function in forms.py, I would like to save automatically some information in a session variable. However, I do not seem to get access to the request variable. All examples for handing over the request variable are based on function based views, but here I am using a class based view. My forms.py: from django import forms from item.models import Item class CreateItemForm(forms.ModelForm): class Meta: model = Item fields = ('name', 'description') def __init__(self, request, *args, **kwargs): self.request = request super(CreateItemForm, self).__init__(*args, *