Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #72 from antonagestam/cleanup
Browse files Browse the repository at this point in the history
remove django17 support
  • Loading branch information
antonagestam committed Jan 13, 2016
2 parents dd21a4d + 49134df commit 9ab7980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
13 changes: 3 additions & 10 deletions collectfast/management/commands/collectstatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,21 @@
import hashlib
import datetime

from django import VERSION
from django.conf import settings
from django.contrib.staticfiles.management.commands import collectstatic
from django.core.cache import caches
from django.core.files.storage import FileSystemStorage
from django.core.management.base import CommandError
from django.utils.encoding import smart_str


try:
from django.utils.six.moves import input as _input
except ImportError:
_input = raw_input # noqa


collectfast_cache = getattr(settings, "COLLECTFAST_CACHE", "default")

if VERSION >= (1, 7):
from django.core.cache import caches
cache = caches[collectfast_cache]
else:
from django.core.cache import get_cache
cache = get_cache(collectfast_cache)

cache = caches[collectfast_cache]
debug = getattr(
settings, "COLLECTFAST_DEBUG", getattr(settings, "DEBUG", False))

Expand Down
6 changes: 1 addition & 5 deletions collectfast/tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from mock import patch
from os.path import join

from django import VERSION
from django.core.files.storage import Storage, FileSystemStorage
from django.core.files.base import ContentFile
from django.conf import settings
Expand Down Expand Up @@ -101,10 +100,7 @@ def test_destroy_lookup(self, mocked_lookup):
def test_make_sure_it_has_ignore_etag(self):
command = self.get_command()
parser = command.create_parser('', '')
if VERSION >= (1, 8):
self.assertIn('ignore_etag', parser.parse_args())
else:
self.assertTrue(parser.has_option('--ignore-etag'))
self.assertIn('ignore_etag', parser.parse_args())


class TestGetFileHash(CollectfastTestCase):
Expand Down

0 comments on commit 9ab7980

Please sign in to comment.