title: Django 3 ModelForm NameError? I'm sure there's a glaring error but I just cannot see it?
body: <p>Hoping for a bit of help, I've been trying to deal with this error for about 3hrs and I'm going around in circles.</p>
  <p>Django 3 project. It's a simple app for leaving a review for a product and I keep getting a NameError and I just can't figure out what it is?</p>
  <h1>models.py</h1>
  <pre><code>from django.db import models
  from django.forms import ModelForm, Textarea, CharField
  from django.conf import settings
  from django.contrib.auth.models import User
  from products.models import Product
  
  SCORE_CHOICES = [
      ('1', 'One'),
      ('2', 'Two'),
      ('3', 'Three'),
      ('4', 'Four'),
      ('5', 'Five'),
  ]   
  class Review(models.Model):
      user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
      product = models.ForeignKey(Product, on_delete=models.CASCADE)
      date = models.DateField()
      review_title = models.CharField(max_length=100, blank=False)
      review_text = models.TextField(default='')
      score = models.CharField(max_length=3, choices=SCORE_CHOICES)
  
      def __str__(self):
          return f'Review for user {self.user.username}'
  
  class ReviewForm(ModelForm):
      class Meta:
          model = Review
          fields = ['user', 'product', 'date', 'review_title', 'review_text', 'score']
          widgets = {
              'review_text': Textarea(attrs={'cols': 100, 'rows': 20}),
          }
  </code></pre>
  <h1>forms.py</h1>
  <pre><code>from django import forms
  from django.forms import ModelForm
  from products.models import Product
  from review.models import Review, ReviewForm
  
  class ReviewForm(forms.Form):
      product = forms.ModelMultipleChoiceField(queryset=Product.objects.all())
      review_title = forms.CharField(max_length=100)
      review_text = forms.CharField(max_length=100, widget=forms.Textarea)
      score = forms.CharField(
          max_length=3,
          widget=forms.Select(choices=SCORE_CHOICES),
      )
      date = forms.DateField(auto_now=True, editable=False, null=False, blank=False)
      user = forms.CharField(max_length=100)
  </code></pre>
  <h1>views.py</h1>
  <pre><code>from django.shortcuts import render
  from django.contrib.auth.decorators import login_required
  from django.http import HttpResponseRedirect
  from .forms import *
  
  @login_required
  def writeReview(request):
      if request.method == 'POST':
          form = ReviewForm(request.POST)
          if form.is_valid():
              return HttpResponseRedirect('/thanks')
      else:
          form = ReviewForm()
      context = {'form': form, 'menu_class': 'menu-login'}
      return render(request, 'review/displayWriteReview.html', context)
  </code></pre>
  <p>I keep getting the following error and just cannot see it. Calling it a day but if anyone can point me in the right direction where I've gone wrong I'd be so very appreciative.</p>
  <h1>Error</h1>
  <pre><code>Traceback (most recent call last):
    File &quot;manage.py&quot;, line 21, in &lt;module&gt;
      main()
    File &quot;manage.py&quot;, line 17, in main
      execute_from_command_line(sys.argv)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/__init__.py&quot;, line 401, in execute_from_command_line
      utility.execute()
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/__init__.py&quot;, line 395, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 328, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 369, in execute
      output = self.handle(*args, **options)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/commands/check.py&quot;, line 64, in handle
      fail_level=getattr(checks, options['fail_level']),
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 395, in check
      include_deployment_checks=include_deployment_checks,
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/management/base.py&quot;, line 382, in _run_checks
      return checks.run_checks(**kwargs)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/checks/registry.py&quot;, line 72, in run_checks
      new_errors = check(app_configs=app_configs)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/checks/urls.py&quot;, line 40, in check_url_namespaces_unique
      all_namespaces = _load_all_namespaces(resolver)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/core/checks/urls.py&quot;, line 57, in _load_all_namespaces
      url_patterns = getattr(resolver, 'url_patterns', [])
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/urls/resolvers.py&quot;, line 588, in url_patterns
      patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/urls/resolvers.py&quot;, line 581, in urlconf_module
      return import_module(self.urlconf_name)
    File &quot;/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/Users/peggy/candles/candles/urls.py&quot;, line 29, in &lt;module&gt;
      path('review/', include('review.urls')),
    File &quot;/Users/peggy/candles/.env/lib/python3.7/site-packages/django/urls/conf.py&quot;, line 34, in include
      urlconf_module = import_module(urlconf_module)
    File &quot;/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/Users/peggy/candles/review/urls.py&quot;, line 3, in &lt;module&gt;
      from review import views
    File &quot;/Users/peggy/candles/review/views.py&quot;, line 4, in &lt;module&gt;
      from .forms import *
    File &quot;/Users/peggy/candles/review/forms.py&quot;, line 6, in &lt;module&gt;
      class ReviewForm(forms.Form):
    File &quot;/Users/peggy/candles/review/forms.py&quot;, line 12, in ReviewForm
      widget=forms.Select(choices=SCORE_CHOICES),
  NameError: name 'SCORE_CHOICES' is not defined
  </code></pre>
  <p>Sincerest of thanks in advance for any help.</p>
  <p>Wayne :)</p>