title: Can I use redirect or render as a way to "refresh" the current web page I'm on in django?
body: <p>I'm wondering if I can use the redirect()/render() function and point to the default page (<a href="http://127.0.0.1:8000" rel="nofollow noreferrer">http://127.0.0.1:8000</a>) as a way to essentially refresh the page I'm on.  I feel like it'd work but I'm not sure what to put in the parameters of the function, I've seen people say redirect(&quot;/path/&quot;) but that gives me an error the second I click my submission button. as well as if I need to change anything elsewhere within the framework.  I also know you can return multiple items in python, but can I return the original item as well as a call to redirect()/render()?</p>
  <p>Here is my views.py file:</p>
  <pre><code>from django.shortcuts import render
  from django.shortcuts import redirect
  from django.urls import reverse
  from django.views.generic.edit import FormView
  from django.views.decorators.csrf import csrf_exempt
  
  from .forms import FileFieldForm
  from django.http import HttpResponse
  
  from .perform_conversion import FileConverter
  import zipfile
  import io
  
  
  def FileFieldFormView(request, *args, **kwargs):
   
      form = FileFieldForm(request.POST)
      files = request.FILES.getlist('file_field')
  
      if request.method == 'POST':
          print(request)
          form = FileFieldForm(request.POST, request.FILES)
          if form.is_valid():
  
          
              zip_buffer = io.BytesIO()   
              with zipfile.ZipFile(zip_buffer, &quot;w&quot;, False) as zip_file:
              
                  for f in files:
                      fileconverter = FileConverter(f.name)
                      fileconverter.run(f.file)
                  
                      for img_name, img in fileconverter.output.items():
                  
                          data = io.BytesIO(img)
                      
                          zip_file.writestr(img_name, data.getvalue())
              
              # Set the return value of the HttpResponse
              response = HttpResponse(zip_buffer.getvalue(), content_type='application/octet-stream')
              # Set the HTTP header for sending to browser
              response['Content-Disposition'] = &quot;attachment; filename=%s&quot; % 'zip.zip'
              response.set_signed_cookie('csrftoken', request.COOKIES['csrftoken'])
          
          
              # Return the response value
              return response
  
              
          else:
              return HttpResponse('Form Invalid')
  
      else:
          return render(request, 'file_converter.html')
  </code></pre>