title: Django: AttributeError: 'User' object has no attribute 'get'
body: <p>I'm getting <strong>AttributeError: 'User' object has no attribute 'get'</strong> in Django, I am trying to get the favorite movie genres of the user.
  My form looks like this:</p>
  <pre><code>class GenresForm(forms.ModelForm):
     firstGenre = forms.CharField(label=&quot;What is your favorite genre?&quot;, widget=forms.Select(choices=GENRE_CHOICES))
     secondGenre = forms.CharField(label=&quot;What is your second favorite genre?&quot;, widget=forms.Select(choices=GENRE_CHOICES))
     thirdGenre = forms.CharField(label=&quot;What is your third favorite genre?&quot;, widget=forms.Select(choices=GENRE_CHOICES))
  
  class Meta:
      model = Favorites
      fields = [&quot;firstGenre&quot;, &quot;secondGenre&quot;, &quot;thirdGenre&quot;]
  </code></pre>
  <p>My view:</p>
  <pre><code>def genres(request):
    user = request.user
    if request.method == &quot;POST&quot;: 
        form = GenresForm(request.POST) 
        if form.is_valid():
            genres = form.save(commit=False)
            genres.user = request.user
            genres.save() 
            return redirect(&quot;/home&quot;) 
    else: 
        form = GenresForm(request.user) 
    return render(request, 'core/genres.html', {&quot;form&quot;:form}) 
  </code></pre>
  <p>and my Model</p>
  <pre><code>class Favorites(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
    firstGenre = models.CharField(max_length=50)
    secondGenre = models.CharField(max_length=50)
    thirdGenre = models.CharField(max_length=50)
  </code></pre>