title: django file upload doesn't work
body: <p>Im working on web app project for study. I have a problem with file upload.
  It works for an admin, but for regular user files don't save. It must be a problem with mu <strong>views.py</strong> or <strong>template html</strong></p>
  
  <ol>
  <li><p><strong>forms.py</strong></p>
  
  <pre><code>class DocumentUpload(forms.ModelForm):
      class Meta:
          model = Form
          fields = ('file',)
  </code></pre></li>
  <li><p><strong>models.py</strong></p>
  
  <pre><code>class Form(TimeStampedModel, TitleSlugDescriptionModel):
      author = models.ForeignKey(User, on_delete=models.CASCADE)
      title = models.CharField(max_length=512)
      is_final = models.BooleanField(default=False)
      is_public = models.BooleanField(default=False)
      is_result_public = models.BooleanField(default=False)
      file = models.FileField(null=True, blank=True)
  
      def __str__(self):
          return self.title
  
      def get_absolute_url(self):
          return reverse('form-detail', kwargs={'slug': self.slug})
  </code></pre></li>
  <li><p><strong>views.py</strong></p>
  
  <pre><code>def create_form(request):
      if request.method == 'POST':
          user = request.user
          data = ParseRequest(request.POST)
          print(data.questions())
          print(data.form())
          parsed_form = data.form()
          parsed_questions = data.questions()
  
          # tworzy formularz o podanych parametrach
          formfile = DocumentUpload(request.POST, request.FILES or None)
          if formfile.is_valid():
              form = formfile.save(commit=False)
              print(form)
              form.author = user
              form.title = parsed_form['title']
              form.is_final = parsed_form['is_final']
              form.is_result_public = parsed_form['is_result_public']
              form.description = parsed_form['description']
              form.save()
              # zapisuje pytania z ankiety wraz z odpowienimi pytaniami
              for d in parsed_questions:
                  question = Question(form=form, question=d['question'])
                  question.save()
                  # dla kazdego pytania zapisz wszystkie opcje odpowiadania
                  for opt in d['options']:
                      option = Option(question=question, option=opt)
                      option.save()
              return render(request, 'forms/form_form.html', {})
      else:
          form = DocumentUpload()
          return render(request, 'forms/form_form.html', {'form': form})
  </code></pre></li>
  <li><p><strong>create_form.html</strong></p>
  
  <pre><code>    {% block content %}
      &lt;form method="post" id="form" enctype='multipart/form-data'&gt;
      {%csrf_token %}
      &lt;div class="form-group"&gt;
           {% csrf_token %}
           &lt;label for="form-title"&gt;Tytuł formularza&lt;/label&gt;
           &lt;input id="form-title" class="form-control" type="text" 
                                    placeholder="Tytuł" required/&gt;
       &lt;/div&gt;
          {{ form.as_p }}
      &lt;input class="btn btn-default" type="submit" value="zapisz"/&gt;
      &lt;/form&gt;
      {% endblock %}
  </code></pre>
  
  <p>5.<strong>settings.py</strong></p>
  
  <pre><code>....
  DATABASES = {
      'default': {
      'ENGINE': 'django.db.backends.sqlite3',
     'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      }
  }
  STATIC_URL = '/static/'
  STATICFILES_DIRS = [
      os.path.join(BASE_DIR, 'static'),
  ]
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  
  STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  ...
  </code></pre>
  
  <p>5.<strong>urls.py</strong></p>
  
  <pre><code>if settings.DEBUG:
      urlpatterns += 
       static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
      urlpatterns += static(settings.MEDIA_URL, 
           document_root=settings.MEDIA_ROOT)
  </code></pre></li>
  </ol>