title: NoneType' object has no attribute 'model'
body: <p>One of my forms is giving me this error, and I cannot seem to figure out what the problem is.</p>
  
  <pre><code>11:24:04 web.1  | Internal Server Error: /dash/location/add
  11:24:04 web.1  | Traceback (most recent call last):
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
  11:24:04 web.1  |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
  11:24:04 web.1  |     return view_func(request, *args, **kwargs)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/views/generic/base.py", line 69, in view
  11:24:04 web.1  |     return self.dispatch(request, *args, **kwargs)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
  11:24:04 web.1  |     return handler(request, *args, **kwargs)
  11:24:04 web.1  |   File "/Users/nir/dashboard/pinpoint/apps/locationmanager/views.py", line 43, in post
  11:24:04 web.1  |     if form.is_valid():
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/forms.py", line 129, in is_valid
  11:24:04 web.1  |     return self.is_bound and not bool(self.errors)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/forms.py", line 121, in errors
  11:24:04 web.1  |     self.full_clean()
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/forms.py", line 273, in full_clean
  11:24:04 web.1  |     self._clean_fields()
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/forms.py", line 288, in _clean_fields
  11:24:04 web.1  |     value = field.clean(value)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/fields.py", line 148, in clean
  11:24:04 web.1  |     value = self.to_python(value)
  11:24:04 web.1  |   File "/Library/Python/2.7/site-packages/django/forms/models.py", line 1136, in to_python
  11:24:04 web.1  |     except (ValueError, self.queryset.model.DoesNotExist):
  11:24:04 web.1  | AttributeError: 'NoneType' object has no attribute 'model'
  </code></pre>
  
  <p>This is the view that the error is occuring in:</p>
  
  <pre><code>class AddLocation(View):
  
      template_name = "dash/Addlocation.html"
      form = locationForm()
      def get(self, request, *args, **kwargs):
          user = User.objects.get(username=request.user.username)
          self.form.fields['region_name'].queryset = Region.objects.filter(location__manager=user)
          return render(request, self.template_name, {'form': self.form})
  
      def post(self, request, *args, **kwargs):
          form = locationForm(request.POST)
          if form.is_valid():
              region_obj, _created = Region.objects.get_or_create(name=form.cleaned_data['region_name'])
              form.cleaned_data['region_name'] = region_obj
              user = User.objects.get(username=request.user.username)
              location = Location(
                  region_obj,
                  user,name = form.cleaned_data['name'],
                  street_address = form.cleaned_data['street_address'],
                  city = form.cleaned_data['city'],
                  zip_code = form.cleaned_data['zip_code']
              )
              location.save()
  
              return redirect(reverse('location_manager'))
          else:
              form = locationForm(request.POST)
              return render(request, self.template_name, {'form': form})
  </code></pre>
  
  <p>specifically it seems that the problem is occurring when trying to validate <code>if form.is_valid():</code></p>
  
  <p>I can post more information if needed, but I really have no clue what this error is getting at. Can someone shed some light on this?</p>
  
  <p>Edit: 
  Here is the form itself</p>
  
  <pre><code>from django import forms
  
  
      class locationForm(forms.Form):
          region_name = forms.ModelChoiceField(queryset=None, label="Region Name")
          location_name = forms.CharField()
          street_address = forms.CharField()
          city = forms.CharField()
          zip_code = forms.CharField()
  </code></pre>