title: NameError: name 'Log_in' is not defined (How can I fetch email and password from my table Sign_up)
body: <p>I want to make user is valid or not by matching the email id and password form sign_up table if correct then login other wise thy need to log_in:</p>
  <pre><code>#models.py
  from django.db import models
  from django.contrib.auth.models import User
  
  # Create your models here.
  class Log_in(models.Model):
      email = models.EmailField(max_length=50,null=True)
      password = models.CharField(max_length=10)
  
      def __str__(self):
          return str(self.email)
  
  class Sign_up(models.Model):
      email = models.EmailField(max_length=50,null=True)
      name = models.CharField(max_length=50)
      password = models.CharField(max_length=10)
  
      def __str__(self):
          return str(self.email)
  
  #views.py
  def contact(request):
      if request.method == &quot;POST&quot;:
          email = request.POST.get(&quot;email&quot;)
          password = request.POST.get(&quot;password&quot;)
          email_check = Log_in.email
          pwd_check = [Sign_up.password]
          if email in email_check and password in pwd_check:
              return render(request, 'index.html')
          else:
              return render(request, 'sign-up.html')
  </code></pre>