Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #15035 -- Fixed collectstatic management command to work with n…
…on-local storage backends correctly. Also refactored a bit code smell. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Showing
3 changed files
with
80 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from datetime import datetime | ||
from django.core.files import storage | ||
|
||
class DummyStorage(storage.Storage): | ||
""" | ||
A storage class that does implement modified_time() but raises | ||
NotImplementedError when calling | ||
""" | ||
def _save(self, name, content): | ||
return 'dummy' | ||
|
||
def delete(self, name): | ||
pass | ||
|
||
def exists(self, name): | ||
pass | ||
|
||
def modified_time(self, name): | ||
return datetime.date(1970, 1, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters