0.5: Django 3.2 support, drop Django<1.11, Python<3.6, remove some compatibility...
[fnpdjango.git] / fnpdjango / utils / views.py
index f2270cc..07f3905 100644 (file)
@@ -2,13 +2,13 @@
 View-specific utilities.
 """
 
 View-specific utilities.
 """
 
-from django.conf import settings
+from .. import app_settings
 from django.http import HttpResponse, HttpResponseRedirect
 
 
 def serve_file(url):
     """Serves an URL either though Nginx's X-accel, or by redirection.""" 
 from django.http import HttpResponse, HttpResponseRedirect
 
 
 def serve_file(url):
     """Serves an URL either though Nginx's X-accel, or by redirection.""" 
-    if settings.X_ACCEL_REDIRECT:
+    if app_settings.XACCEL:
         response = HttpResponse()
         response['Content-Type'] = ""
         response['X-Accel-Redirect'] = url
         response = HttpResponse()
         response['Content-Type'] = ""
         response['X-Accel-Redirect'] = url