summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-10-14 04:10:02 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-10-14 04:10:02 +0000
commita3d015fad09e0376484b0e7c4b00f07243ee3af6 (patch)
tree3bfe9233b2fdd98ec59775c9f9c00cfcf8ac65e4
parent5f9821a5d012f8627330aba3f565fe5d69d18c86 (diff)
Added module docstring and corrected order of imports to adhere to PEP 8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/static.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/django/views/static.py b/django/views/static.py
index e274057617..dce45d914d 100644
--- a/django/views/static.py
+++ b/django/views/static.py
@@ -1,6 +1,8 @@
-from django.template import loader
-from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseNotModified
-from django.template import Template, Context, TemplateDoesNotExist
+"""
+Views and functions for serving static files. These are only to be used
+during development, and SHOULD NOT be used in a production setting.
+"""
+
import mimetypes
import os
import posixpath
@@ -9,6 +11,10 @@ import rfc822
import stat
import urllib
+from django.template import loader
+from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseNotModified
+from django.template import Template, Context, TemplateDoesNotExist
+
def serve(request, path, document_root=None, show_indexes=False):
"""
Serve static files below a given point in the directory structure.