Skip to content

Commit

Permalink
Merge pull request #100 from stphivos/ish-vasa-feature/fix-reqs
Browse files Browse the repository at this point in the history
Use compatible release clause in tox deps versions
  • Loading branch information
stphivos authored May 4, 2019
2 parents a8e11a1 + f665904 commit 20b0246
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
32 changes: 22 additions & 10 deletions examples/users/users/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import django

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand Down Expand Up @@ -40,16 +41,27 @@
'analytics',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
if django.VERSION[0] == 1:
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
else:
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'users.urls'

Expand Down
2 changes: 1 addition & 1 deletion requirements/core.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mock
model_mommy>=1.5.1
Django>=1.8.17,<2.2
Django>=1.8.17,<2.2.99
20 changes: 10 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ flake8-max-line-length = 120
[testenv]
deps =
-rrequirements/dev.txt
dj18: Django==1.8.17
dj19: Django==1.9.12
dj110: Django==1.10.5
dj111: Django==1.11.6
dj20: Django==2.0.2
dj21: Django==2.1
dj22: Django==2.2
drf33: djangorestframework==3.3.2
drf37: djangorestframework==3.7.7
drf39: djangorestframework==3.9.2
dj18: Django~=1.8.17
dj19: Django~=1.9.12
dj110: Django~=1.10.5
dj111: Django~=1.11.17
dj20: Django~=2.0.2
dj21: Django~=2.1.0
dj22: Django~=2.2.1
drf33: djangorestframework~=3.3.2
drf37: djangorestframework~=3.7.7
drf39: djangorestframework~=3.9.2

commands =
py.test django_mock_queries/ tests/ --cov-report term-missing --cov=django_mock_queries --flake8
Expand Down

0 comments on commit 20b0246

Please sign in to comment.