Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/views/static.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #25236 -- Removed ifequal/ifnotequal usage.Tim Graham2015-08-081-2/+2
|
* Fixed a few uses of Template that relied on a default ↵Aymeric Augustin2015-02-221-4/+6
| | | | | | engine. Refs #24389.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+6
|
* Fixed #24072 -- Added FileResponse for streaming binary ↵Collin Anderson2015-01-051-3/+2
| | | | files.
* Fixed #23276 -- Deprecated passing views as strings to ↵Tim Graham2014-08-121-1/+3
| | | | url().
* Merge pull request #1821 from Bouke/tickets/14170Aymeric Augustin2013-11-041-2/+2
|\ | | | | #14170 -- Reset i18n cache when settings changed
| * Fixed #14170 -- Reset i18n cache when settings changeBouke Haarsma2013-11-031-2/+2
| |
* | Correct flake8 E302 violationsRay Ashman Jr2013-11-031-0/+3
|/
* Fixed all the E203 violationsAlex Gaynor2013-10-271-3/+3
|
* Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin2013-09-051-4/+1
|
* Removed compatibility code for streaming responses.Aymeric Augustin2013-06-291-4/+4
| | | | | | This code provided a deprecation path for old-style streaming responses. Refs #6527, #7581.
* Minor optimization in the static serve view.Aymeric Augustin2013-01-241-3/+4
|
* Fixed #7581 -- Added streaming responses.Aymeric Augustin2012-10-201-3/+3
| | | | Thanks mrmachine and everyone else involved on this long-standing ticket.
* Fixed #18675 -- Fixed was_modified_since with ↵Claude Paroz2012-09-261-1/+1
| | | | | | floating-point mtime Thanks Simon Charette for the patch.
* Fixed #11340 -- Prevented HttpResponseNotModified to ↵Claude Paroz2012-08-221-1/+1
| | | | | | | | have content/content-type The HTTP 1.1 spec tells that the 304 response MUST NOT contain a message body. Thanks aparajita for the report.
* [py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin2012-07-221-2/+5
| | | | | Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
* Removed usage of mimetype kwarg of HttpResponseClaude Paroz2012-06-301-2/+2
| | | | Refs #16519.
* Fixed #18269 -- Applied unicode_literals for Python 3 ↵Claude Paroz2012-06-071-3/+4
| | | | | | | compatibility. Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
* Removed with_statement imports, useless in Python >= ↵Claude Paroz2012-03-301-1/+0
| | | | | | 2.6. Refs #17965. Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Updated core base translation files with new strings. ↵Jannis Leidel2012-03-051-1/+1
| | | | | | Refs #17822. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17458 -- Marked Http404 error messages for ↵Jannis Leidel2012-02-041-4/+7
| | | | | | translation. Thanks, Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Explicitly close a file in the static serve view. ↵Alex Gaynor2011-05-271-1/+3
| | | | | | Thanks to Benjamin Peterson for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Switched to HTML5 doctype in all Django supplied templates.Luke Plant2011-04-201-2/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@16050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15613: Don't send content-length headers for ↵Andrew Godwin2011-04-041-1/+3
| | | | | | non-regular files. Thanks to jaylett. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15531 -- Partially reverted [15701] due to ↵Jannis Leidel2011-03-021-31/+2
| | | | | | compatibility issues with middlewares that modify content of responses. Thanks for the report, schinckel. Refs #15281. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15281 -- Made the static view use an iterator ↵Jannis Leidel2011-03-011-6/+32
| | | | | | when serving a file, effectively making this less of a memory hog. Also use the appropriate attributes of the stat object instead of indexes. Thanks for the initial patch, FunkyBob and aaugustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #717 - If-Modified-Since handling should compare ↵Luke Plant2011-03-011-6/+2
| | | | | | | | | dates according to RFC 2616 Thanks to Maniac for the report, julienb for the initial patch, and especially to aaugustin for the final patch and tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #15270 -- Moved back the serve view to ↵Jannis Leidel2011-02-141-10/+111
| | | | | | django.views.static due to dependency conflicts with the contrib app staticfiles (reverts parts of r14293). Added a helper function that generates URL patterns for serving static and media files during development. Thanks to Carl for reviewing the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14693, #14709 -- Backwards incompatible change to ↵Jannis Leidel2010-11-171-2/+2
| | | | | | | | | | | | | | | | rectify the confusion around the STATICFILES_URL and STATICFILES_ROOT settings. * Two new global settings that will be used by -- **but are not limited to** -- the staticfiles app: STATIC_ROOT and STATIC_URL. * Moving the 'django.contrib.staticfiles.templatetags.staticfiles' template tag to the core ('django.templatetags.static') and renaming it to 'get_static_prefix'. * Moving the context processor 'django.contrib.staticfiles.context_processors.staticfiles' to the core ('django.core.context_processors.static') and renaming it to 'static'. * Paths in media definitions will use STATIC_URL as the prefix if the value is not None, and falls back to the previously used MEDIA_URL. Thanks again to the community for constructive criticism and Carl and Russ for sanity-inducing discussions on IRC. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14524, #14582, #14617, #14665 and #14667 -- ↵Jannis Leidel2010-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweaked staticfiles app. * Updated StaticFilesHandler and AdminMediaHandler to make use of the 404 handler if needed. * Updated runserver management command to serve static files only in DEBUG mode (or if specified the --insecure option) and if the staticfiles app is in INSTALLED_APPS. Also added an option to disable serving completely (--nostatic). * Added check in debug mode if STATICFILES_* settings are different to MEDIA_* settings. * Removed a faulty PendingDeprecationWarning in AdminMediaHandler that is triggered every time runserver is used. * Fixed an issue with the modification time checks when running collectstatic. * Extended and refined documentation. Thanks to everyone for input, especially to Carl Meyer, Ted Kaemming and Adam Vandenberg for patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12323 and #11582 -- Extended the ability to ↵Jannis Leidel2010-10-201-108/+9
| | | | | | handle static files. Thanks to all for helping with the original app, the patch, documentation and general support. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12544 and #13600 -- Fixed static files serving ↵Jannis Leidel2010-09-261-1/+1
| | | | | | view to catch invalid date from If-Modified-Since header. Thanks akaihola and SmileyChris for patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7535 -- Correctly set Content-Encoding header in ↵Jannis Leidel2010-09-261-1/+4
| | | | | | static files serving view. Thanks for the report and patch, Kevin Hunter. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed a whole bunch of places to raise exception ↵Adrian Holovaty2010-01-101-2/+2
| | | | | | instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11757 - Set mimetype when responding with ↵Jannis Leidel2010-01-091-2/+2
| | | | | | HttpResponseNotModified in django.server.static. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Revised r9566 slightly to be backwards compatible with ↵Malcolm Tredinnick2009-01-091-1/+2
| | | | | | | | | | | | | | versions 1.0 - 1.0.2. Also documented the change. We prefer to load directory_index.html for static directory listings, but if you have the (older style) "directory_index" template and no .html version, we'll load that. This should stop a bunch of mysterious breakages when people upgrade to Django 1.0.3 or Django 1.1. Also keeps the docs in sync with released code. Fixed #9993. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9754: static-serving view now uses correct ↵James Bennett2008-12-041-2/+2
| | | | | | template name for directory indexes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8172 -- Improved a whole bunch of contrib ↵Adrian Holovaty2008-09-081-3/+6
| | | | | | templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding git-svn-id: http://code.djangoproject.com/svn/django/trunk@8984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5596 -- Changed the static view for the ↵Malcolm Tredinnick2007-12-171-1/+2
| | | | | | development server so that Django doesn't crash if somebody tries to serve a 200MB file. Patch from eibaan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Edited docstring from [6505] -- single spaces separate ↵Adrian Holovaty2007-11-301-1/+1
| | | | | | sentences, not double spaces. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1291 -- Fixed a potential infinite loop for some ↵Malcolm Tredinnick2007-11-291-0/+1
| | | | | | | | | URL constructions in the development server. Thanks, Graham Carlyle. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5816 -- Fixed a regression from [6333] that ↵Gary Wilson Jr2007-10-311-4/+4
| | | | | | generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added module docstring and corrected order of imports to ↵Gary Wilson Jr2007-10-141-3/+9
| | | | | | adhere to PEP 8. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed typo in comment.Gary Wilson Jr2007-10-061-2/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@6455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Backed out the changes in [5482] for a bit whilst some ↵Malcolm Tredinnick2007-06-221-1/+1
| | | | | | | | | more investigation into side-effects is done. Refs #4565. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4565 -- Changed template rendering to use ↵Malcolm Tredinnick2007-06-171-1/+1
| | | | | | | | | | iterators, rather than creating large strings, as much as possible. This is all backwards compatible. Thanks, Brian Harring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed template names from [3707] to remove initial ↵Adrian Holovaty2006-09-051-1/+1
| | | | | | caps, to fit our style. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Re-added the template rendering signal for ↵Russell Keith-Magee2006-09-021-1/+1
| | | | | | testing purposes; however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Reverted [3659], the 'name' field on Template objects ↵Adrian Holovaty2006-08-271-1/+1
| | | | | | and the signal emitted whenever a template is rendered. Refs #2333. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Added a signal that is emitted whenever a ↵Russell Keith-Magee2006-08-271-1/+1
| | | | | | template is rendered, and added a 'name' field to Template to allow easy identification of templates. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3659 bcc190cf-cafb-0310-a4f2-bffc1f526a37