Commit Graph

95 Commits

Author SHA1 Message Date
Curtis Maloney 07876cf02b Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
Tai Lee 4c6ffcf721 Fixed #20819 -- Return 404 instead of 500 error when ``staticfiles`` view is used in production. 2013-07-31 18:58:50 +10:00
Claude Paroz fdd7a355bf Deprecated django.utils.importlib
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Tim Graham 9b88dd3809 Fixed #20679 -- Corrected CachedFilesMixin.post_process docstring.
Thanks bmispelon for the report.
2013-07-25 12:31:53 -04:00
Ramiro Morales 0fa8d43e74 Replaced `and...or...` constructs with PEP 308 conditional expressions. 2013-05-26 23:47:50 -03:00
Aymeric Augustin 9c487b5974 Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Aymeric Augustin 90fe9141de Fixed #18986 -- Improved error message for missing files
in CachedStaticFilesStorage. Thanks zyegfryed for his work on the patch.
2013-04-28 16:45:05 +02:00
Aleksandra Sendecka 32a7ab2148 Fixed #19526
CSS specifications governs that syntax is case insensitive.
This modifies CachedFilesMixin to support that.
2013-02-23 23:05:22 +01:00
Jannis Leidel 6bbf4e57c8 Fixed embarrassing typo in last commit. 2013-02-23 14:59:51 +01:00
fako 2db9cbe97c Removes document_root argument from django.contrib.staticfiles.views.serve
This argument can be removed, because the new way of finding static files doesn't take document_root into account at all.
2013-02-23 14:38:13 +01:00
Jannis Leidel c12891e8cd Fixed #19850 -- Use configured staticfiles storage to find the URL of a static file in the admin. 2013-02-23 14:36:51 +01:00
Claude Paroz 7c5b244826 Fixed #17061 -- Factored out importing object from a dotted path
Thanks Carl Meyer for the report.
2013-02-04 16:38:25 +01:00
Matt Robenolt 393c268e72 Fixed #19715 -- Simplified findstatic output when verbosity set to 0 2013-02-01 11:55:05 +01:00
Tim Graham ee26797cff Fixed typos in docs and comments 2013-01-29 10:55:55 -07:00
Aymeric Augustin cebbec9b61 Fixed #19540 -- Stopped using deprecated os.stat_float_times. 2013-01-26 13:34:40 +01:00
Mitar cb98806101 Update django/contrib/staticfiles/management/commands/collectstatic.py
Fixed small output error.
2012-12-27 20:37:12 +01:00
Aymeric Augustin 1e4a27d087 Fixed #19468 -- Decoded request.path correctly on Python 3.
Thanks aliva for the report and claudep for the feedback.
2012-12-22 13:32:39 +01:00
Claude Paroz c91667338a Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
David Fischer 06b1dedae5 Fixed comment typo 2012-08-29 17:09:47 -07:00
Claude Paroz ebc773ada3 Replaced many smart_bytes by force_bytes
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
2012-08-29 11:20:32 +02:00
Alex Gaynor d674bd603e Final explicit closing for staticfiles, they now pass on python3 with -Wall and there are no warnings about unclosed files 2012-08-15 01:29:05 -07:00
Claude Paroz 7d48e077b5 [py3] Fixed staticfiles tests 2012-08-14 17:24:31 +02:00
Karen Tracey b82eb10b26 Fixed #18754 -- cache keys created by post_process
Corrected to always generate the cache keys from file names with
forward slashes, not backslashes.
2012-08-11 17:05:26 -04:00
Claude Paroz b8e49d70f2 [py3] Replaced raw_input by input
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Aymeric Augustin c5ef65bcf3 [py3] Ported django.utils.encoding.
* Renamed smart_unicode to smart_text (but kept the old name under
  Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
  and smart_bytes under Python 2 (which is backwards compatible).
  Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
  want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin ee191715ea [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
Aymeric Augustin 0d914d08a0 [py3] Updated urllib/urllib2/urlparse imports.
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Jannis Leidel 1aa0d8ac4d Fixed #18487 -- Made sure that protocol-relative URLs aren't processed by the cached staticfiles storage. Thanks to LukaszBalcerzak for the patch. 2012-07-08 18:25:12 +02:00
Jannis Leidel 3047981517 Fixed #18050 -- Fixed a rather glaring bug in the handling of @import statements when using the cached staticfiles storage. 2012-07-08 18:17:53 +02:00
Jannis Leidel 3727f6d096 Fixed #18430 -- Use the FILE_CHARSET setting when reading from a file during post processing with the cached staticfiles storage. Thanks to Brant Young for initial debugging. 2012-07-08 12:56:49 +02:00
Jannis Leidel 0a68a2994b Fixed #18254 -- Added ability to the static template tags to store the result in a contextt variable. Many thanks to Andrei Antoukh for the initial patch. 2012-07-07 15:30:25 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz 822d6d6dab Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class 2012-05-19 13:51:54 +02:00
Jannis Leidel 5f75ac91df Fixed #17896 -- Added file_hash method to CachedStaticFilesStorage to be able to customize the way the hashed name of a file is created. Thanks to mkai for the initial patch. 2012-05-16 13:21:50 +02:00
Jannis Leidel 1c1a229632 Set the post process cache when finished instead of one by one.
This should prevent a race condition if running collectstatic is
canceled or its cache is accessed from other processes, leaving the
cache in a corrupt state.
2012-05-10 18:31:48 +02:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Claude Paroz 5c53e30607 Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 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
2012-03-30 08:02:08 +00:00
Jannis Leidel 0ee801e360 Fixed #17857 -- Stopped CachedStaticFilesStorage from creating absolute URLs unnecessarily. Thanks, tgecho.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 03:48:11 +00:00
Jannis Leidel 7487c74020 Fixed #17865 -- Strip whitespaces from the paths when using the CachedStaticFilesStorage backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 03:48:03 +00:00
Jannis Leidel 3a5f9cd1ae Fixed #17861 -- Took care of special characters when creating the staticfiles storage cache keys. Many thanks to Preston Holmes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 20:28:09 +00:00
Jannis Leidel e88a65660f Fixed #17806 -- Fixed off-by-n error in the CachedStaticFilesStorage that prevented it from finding files in nested directories. Many thanks to lpetre.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 11:29:14 +00:00
Jannis Leidel 1c33c0a02a Fixed #17737 -- Stopped the collectstatic management command from copying the wrong file in repeated runs. Thanks, pigletto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01 23:02:38 +00:00
Jannis Leidel 758a0cd0f1 Fixed #17689 -- Stopped the CachedStaticFilesStorage from trying to hash paths that aren't files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 14:40:32 +00:00
Jannis Leidel 803de60c08 Stopped the collectstatic management from being wastful with file handlers. Refs r17519.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-14 09:55:09 +00:00
Jannis Leidel 4f1ac8f5f1 Minor bugfixing of the staticfiles app following upstream development in django-staticfiles.
- Create the files to ignore during the tests dynamically (.hidden and backup~)
- Refactored the post_processing method of the CachedFilesMixin storage mixin to be less time consuming.
- Refactored handling of fragments in the post_process method.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-13 10:51:17 +00:00
Jannis Leidel f46c4140ce Fixed #17656 -- Stopped the collectstatic management command from running the database validation. Thanks, jcspray.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-12 14:49:42 +00:00
Jannis Leidel 46c12d1293 Fixed #17455 -- Extended `CachedStaticFilesStorage` slightly to handle some URLs better that are used to add support for webfonts to IE 6-8. Also ignore `data:` URLs and fragment-only URLs (e.g. `#default#VML`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-27 22:49:24 +00:00
Karen Tracey b045783729 Fixed #17462: Adjusted staticfiles CachedFilesMixin code so its tests pass on Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-25 19:44:20 +00:00
Jannis Leidel a82488bf4b Fixed #16966 -- Stopped CachedStaticFilesStorage from choking on querystrings and path fragments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-03 10:51:02 +00:00