1
0
mirror of https://github.com/django/django.git synced 2025-10-29 00:26:07 +00:00

Correct flake8 E302 violations

This commit is contained in:
Ray Ashman Jr
2013-11-02 19:53:29 -04:00
parent 3bc0d46a84
commit e2ae8b048e
30 changed files with 260 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ from django.utils.http import http_date, parse_http_date
from django.utils.six.moves.urllib.parse import unquote
from django.utils.translation import ugettext as _, ugettext_noop
def serve(request, path, document_root=None, show_indexes=False):
"""
Serve static files below a given point in the directory structure.
@@ -95,6 +96,7 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
"""
template_translatable = ugettext_noop("Index of %(directory)s")
def directory_index(path, fullpath):
try:
t = loader.select_template(['static/directory_index.html',
@@ -113,6 +115,7 @@ def directory_index(path, fullpath):
})
return HttpResponse(t.render(c))
def was_modified_since(header=None, mtime=0, size=0):
"""
Was something modified since the user last downloaded it?