title: How to fix Django : didn't return an HttpResponse object. It returned None instead?
body: <p>I have used python3.7 and django 2.1 and for django app models and views diretory have separated folder and files.</p>
  
  <ul>
  <li>Project Name : fusion</li>
  <li>App Name : admin_lte</li>
  </ul>
  
  <p>Getting bellow error</p>
  
  <blockquote>
    <p>ValueError at /csv/
    The view django_adminlte.views.file_csv_view.file_csv_show.file_csv_show didn't return an HttpResponse object. It returned None instead.</p>
  </blockquote>
  
  <pre><code>
  Traceback :
  
  Traceback (most recent call last):
    File "C:\Users\parth\Desktop\admin_lte\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
      response = get_response(request)
    File "C:\Users\parth\Desktop\admin_lte\lib\site-packages\django\core\handlers\base.py", line 137, in _get_response
      "returned None instead." % (callback.__module__, view_name)
  ValueError: The view django_adminlte.views.file_csv_view.file_csv_show.file_csv_show didn't return an HttpResponse object. It returned None instead.
  [15/Feb/2019 17:23:57] "POST /csv/ HTTP/1.1" 500 67126
  </code></pre>
  
  <p>I already make all <strong>init</strong>.py file for separated folder.</p>
  
  <pre><code>View file : file_csv_show.py
  
  
     from django.shortcuts import render,redirect
     from django_adminlte.forms import File_csvForm
     from django_adminlte.models import file_csv
  
  def file_csv_show(request):
      if request.method == 'POST':
          form = File_csvForm(request.POST,request.FILES) #request.POST = geting title/auth request.FILES = for book upload
          if form.is_valid():
              try:
                  form.save()
                  return redirect("file_csv_show")
              except:
                  pass
      else:
          form = File_csvForm()
          return render(request,'adminlte/file_csv_index.html',{'form' : form})
  
  
  </code></pre>
  
  <pre><code>models file : file_csv.py
  
  from django.db import models
  
  # Create your models here.
  class File_csv(models.Model):
      title = models.CharField(max_length=50)
      csv_files = models.FileField(upload_to='files/csv')
  
      class Meta:
          db_table = "csv"
  
      def __str__(self):
          return self.title
  
  </code></pre>
  
  <pre><code>html file
  
  {% extends 'adminlte/base.html' %}
  {% load crispy_forms_tags %}
  {% block content %}
  
  {% if user.is_authenticated %}
      &lt;h2&gt;Upload&lt;/h2&gt;
      &lt;form method="post" enctype="multipart/form-data" action="{% url "file_csv" %}"&gt;
          {% csrf_token %}
          &lt;input type="file" name="document"&gt;
          &lt;button type="submit"&gt;Upload File&lt;/button&gt;
      &lt;/form&gt;
      {% if url %}
          &lt;p&gt;Uploaded File : &lt;a href="{{url}}"&gt;{{url}}&lt;/a&gt;&lt;/p&gt;
      {% endif %}
  {% endif %}
  {% endblock %}
  </code></pre>
  
  <pre><code>urls.py file
  
  from django_adminlte import views
  from django_adminlte.views.file_csv_view import file_csv_show
  
  urlpatterns = [
        path('csv/',views.file_csv_view.file_csv_show,name='file_csv'),
  ]
  
  
  
  I want to when file has been uploaded and after page redirect to index page
  
  
  </code></pre>