diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-02 01:31:56 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-02 01:31:56 +0000 |
| commit | f69cf70ed813a8cd7e1f963a14ae39103e8d5265 (patch) | |
| tree | d3b32e84cd66573b3833ddf662af020f8ef2f7a8 /django/views/static.py | |
| parent | d5dbeaa9be359a4c794885c2e9f1b5a7e5e51fb8 (diff) | |
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views/static.py')
| -rw-r--r-- | django/views/static.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/django/views/static.py b/django/views/static.py index 1499dd4847..072a01671e 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -1,15 +1,14 @@ +from django.template import loader +from django.core.exceptions import ImproperlyConfigured +from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseNotModified +from django.template import Template, Context, TemplateDoesNotExist +import mimetypes import os -import urllib import posixpath -import mimetypes import re import rfc822 import stat -from django.core import template_loader -from django.core.exceptions import Http404, ImproperlyConfigured -from django.utils.httpwrappers import HttpResponse, HttpResponseRedirect, \ - HttpResponseNotModified -from django.core.template import Template, Context, TemplateDoesNotExist +import urllib def serve(request, path, document_root=None, show_indexes=False): """ @@ -81,7 +80,7 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ def directory_index(path, fullpath): try: - t = template_loader.get_template('static/directory_index') + t = loader.get_template('static/directory_index') except TemplateDoesNotExist: t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE) files = [] |
