title: NameError: name 'request' is not defined, in Django forms
body: <p>How do I get the current logged in user in <code>forms.py</code>? I am trying to pre-populate the email field of the current user.</p>
  
  <pre><code>class ContactMe(forms.Form):
      name                 = forms.CharField(label = "Name")
      email_address        = forms.CharField(label = "Email Address", intital = request.user.email)
      subject              = forms.CharField(label = "Subject")
      message              = forms.CharField(label = "Message", widget=forms.Textarea(attrs={'cols': 10, 'rows': 3}))
      additional_comments  = forms.CharField(required = False)
      class Meta:
          model = Contact_me
  </code></pre>
  
  <p>I tried passing request from <code>views.py</code> as :</p>
  
  <pre><code>contact_form = ContactMe(request.POST or None, request)
  </code></pre>
  
  <p>and then receiving the request inside of class <code>ContactMe</code> as :</p>
  
  <pre><code>class ContactMe(forms.Form, request):
      name                 = forms.CharField(label = "Name")
      email_address        = forms.CharField(label = "Email Address", intital = **request.user.email**)
      subject              = forms.CharField(label = "Subject")
      message              = forms.CharField(label = "Message", widget=forms.Textarea(attrs={'cols': 10, 'rows': 3}))
      additional_comments  = forms.CharField(required = False)
      class Meta:
          model = Contact_me
  </code></pre>
  
  <p>It throws the error <code>NameError: name 'request' is not defined</code>. I know request is accessible in <code>html</code>, <code>models.py</code>, <code>views.py</code>. How to get it in <code>forms.py</code>?</p>
  
  <p>The <code>views.py</code> : </p>
  
  <pre><code>def list_posts(request):
      request.session.set_expiry(request.session.get_expiry_age())        # Renew session expire time
      instance_list = Post.objects.all()
      register_form = UserRegisterForm(data=request.POST or None)
      if register_form.is_valid():
          personal.views.register_form_validation(request, register_form)
  
      login_form = UserLoginForm(request.POST or None)
      if login_form.is_valid() :
          personal.views.login_form_validation(request, login_form)
  
      feedback_form = FeedbackForm(request.POST or None)
      if feedback_form.is_valid() :
          personal.views.feedback_form_validation(request, feedback_form)
  
      contact_form = ContactMe(request.POST or None, request)
      if contact_form.is_valid() :
      personal.views.contact_form_validation(request, login_form)
  
      if request.POST and not(register_form.is_valid() or login_form.is_valid()):
          if request.POST.get("login"):
              return accounts.views.login_view(request)
          else:
              return accounts.views.register_view(request)
  
      template = 'blog/archives.html'
      dictionary = {
  
          "object_list"   : content,
          "register_form" : register_form,
          "login_form"    : login_form,
          "feedback_form" : feedback_form,
          "contact_form"  : contact_form,
      }
      return render(request,template,dictionary)
  </code></pre>