diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8bcf1693f7aaf9c8b0d033f42cbace912a985328..0235c4e96e381f9ef3f65fa10da3a9e0940e8ded 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,30 +3,67 @@ image: docker:latest stages: - test -test35: +test35-django2: stage: test image: python:3.5 script: + - pip install 'django<3' - pip install -r requirements.txt - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m -test36: +test36-django2: stage: test image: python:3.6 script: + - pip install 'django<3' - pip install -r requirements.txt - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m -test37: +test37-django2: stage: test image: python:3.7 script: + - pip install 'django<3' - pip install -r requirements.txt - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m -testrc: +testrc-django2: stage: test image: python:rc script: + - pip install 'django<3' - pip install -r requirements.txt - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m + + +test35-django3: + stage: test + image: python:3.5 + script: + - pip install 'django>=3' + - pip install -r requirements.txt + - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m + +test36-django3: + stage: test + image: python:3.6 + script: + - pip install 'django>=3' + - pip install -r requirements.txt + - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m + +test37-django3: + stage: test + image: python:3.7 + script: + - pip install 'django>=3' + - pip install -r requirements.txt + - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m + +testrc-django3: + stage: test + image: python:rc + script: + - pip install 'django>=3' + - pip install -r requirements.txt + - coverage run --source='basetheme_bootstrap' manage.py test && coverage report -m \ No newline at end of file diff --git a/basetheme_bootstrap/tokens.py b/basetheme_bootstrap/tokens.py index d1501a6857ad17623de9e2b269aafb9e87029982..7f23acd3c153aff8a88d1e0b5b0ce419d4215a42 100644 --- a/basetheme_bootstrap/tokens.py +++ b/basetheme_bootstrap/tokens.py @@ -1,5 +1,5 @@ +import six from django.contrib.auth.tokens import PasswordResetTokenGenerator -from django.utils import six class TokenGenerator(PasswordResetTokenGenerator): diff --git a/basetheme_bootstrap/views.py b/basetheme_bootstrap/views.py index 0ca369fbeab5c94cfc25328d84f6517dd504d40c..c855ef9583c5de4afd0888b13c277a251c149a02 100644 --- a/basetheme_bootstrap/views.py +++ b/basetheme_bootstrap/views.py @@ -111,7 +111,7 @@ def send_account_created(request, user, auto_active=False): try: activation_link = request.scheme + "://" + request.get_host() activation_link += reverse('basetheme_bootstrap:activate', kwargs={ - 'uidb64': urlsafe_base64_encode(force_bytes(user.pk)).decode(), + 'uidb64': urlsafe_base64_encode(force_bytes(user.pk)), 'token': tokens.account_activation_token.make_token(user) }) if auto_active: diff --git a/requirements.txt b/requirements.txt index a924cbe8f2ab3bea514ec9a747e57c0aa040f841..f07d4cfb678841254aaa6e5f6e35914b125365d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ django django-crispy-forms -coverage \ No newline at end of file +coverage +six \ No newline at end of file