title: ImageField doesn't upload
body: <p>I have been trying to implement a image upload for changing avatar for individual users. The problem I have right now is that it never uploads to the folder. It works from the admin but it doesn't work on the template I've created</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>if 'avatar_upload' in request.POST:
      avatar_form = UserAvatarForm(request.POST, request.FILES, instance=request.user.get_profile())
      if avatar_form.is_valid():
          avatar_form.save()
          return HttpResponse(request.POST['avatar'])
      return HttpResponse("Failed")
  </code></pre>
  
  <p>I've changed the code for viewing the outputs. I get the file name in the <code>POST</code>. But I don't have anything in the <code>request.FILES</code>. So I'm guessing it is a problem there, and I haven't found out so far what the problem could be. Or could it be some problem elsewhere?</p>
  
  <p><strong>template*</strong></p>
  
  <pre><code>&lt;form action="" method="post" enctype="multipart/form-data"&gt;
      {% csrf_token %}
      {% for item in avatar_form %}&lt;p&gt;{{ item.label }}: {{ item }}&lt;/p&gt;
      {% endfor %}
      &lt;input type="submit" value="Upload avatar" name="avatar_upload"&gt;
  &lt;/form&gt; 
  </code></pre>