Commit 0cf0bb81 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg Committed by Luko van der Maas

Update to Django 2.2

parent f77c801a
......@@ -8,8 +8,8 @@ variables:
# Installs:
# - pip: coverage, poetry
# - apt: ghostscript
PY36_IMAGE: thalia/python-thalia:3.6
PY37_IMAGE: thalia/python-thalia:3.7
PY38_IMAGE: thalia/python-thalia:3.8
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/pip-cache"
stages:
......@@ -18,7 +18,7 @@ stages:
codestyle:
stage: test
image: $PY36_IMAGE
image: $PY37_IMAGE
before_script:
- poetry install --no-interaction
script:
......@@ -48,11 +48,7 @@ codestyle:
- poetry run python -Wall -mcoverage run manage.py test
- coverage report
python36-django21:
<<: *djangotest
image: $PY36_IMAGE
python37-django21:
python37-django22:
<<: *djangotest
image: $PY37_IMAGE
after_script:
......@@ -62,6 +58,11 @@ python37-django21:
paths:
- website/covhtml/
python38-django22:
<<: *djangotest
image: $PY38_IMAGE
allow_failure: true
.sshsetup: &sshsetup
before_script:
- mkdir -p ~/.ssh
......@@ -76,7 +77,7 @@ coverage deploy:
stage: deploy
image: debian:stretch
dependencies:
- python37-django21
- python37-django22
environment:
name: coverage/${CI_COMMIT_REF_NAME}
url: https://coverage.technicie.nl/${CI_COMMIT_REF_SLUG}/
......@@ -109,7 +110,7 @@ coverage remove:
docs tests:
stage: test
image: $PY36_IMAGE
image: $PY37_IMAGE
before_script:
# install django deps
- poetry install --no-interaction --extras "docs"
......
This diff is collapsed.
......@@ -6,46 +6,46 @@ authors = ["Thalia Technicie <www@thalia.nu>"]
license = "AGPL-3.0-or-later"
[tool.poetry.dependencies]
python = "^3.6"
django-localflavor = "^2.1"
freezegun = "^0.3.11"
bleach = "^3.1"
django-tinymce4-lite = "^1.7"
rcssmin = "^1.0"
djangorestframework = "^3.9"
django-ical = "^1.5"
django-libsass = "^0.7.0"
django-cors-headers = "^2.4"
python-magic = "^0.4.15"
redis = "^3.2"
Django = "^2.1"
Pillow = "^5.4"
django_compressor = "^2.2"
psycopg2-binary = "^2.7"
bcrypt = "^3.1"
argon2_cffi = "^19.1"
uWSGI = "^2.0"
django-bootstrap4 = "^0.0.7"
firebase-admin = "^2.15"
sentry-sdk = "^0.7.3"
django-sendfile2 = "^0.4.2"
python = "^3.7"
django-localflavor = "~2.1"
freezegun = "~0.3.11"
bleach = "~3.1"
django-tinymce4-lite = "~1.7"
rcssmin = "~1.0"
djangorestframework = "~3.9"
django-ical = "~1.5"
django-libsass = "~0.7.0"
django-cors-headers = "~2.5"
python-magic = "~0.4.15"
redis = "~3.2"
Django = "~2.2"
Pillow = "~5.4"
django_compressor = "~2.2"
psycopg2-binary = "~2.8"
bcrypt = "~3.1"
argon2_cffi = "~19.1"
uWSGI = "~2.0"
django-bootstrap4 = "~0.0.8"
firebase-admin = "~2.15"
sentry-sdk = "~0.7.3"
django-sendfile2 = "~0.4.2"
# docs requirements
recommonmark = { version = "^0.5.0", optional = true }
sphinx = { version = "^1.8", optional = true }
recommonmark = { version = "~0.5.0", optional = true }
sphinx = { version = "~1.8", optional = true }
[tool.poetry.extras]
docs = ["recommonmark", "sphinx"]
[tool.poetry.dev-dependencies]
django-template-check = "^0.3.1"
factory_boy = "^2.11"
flake8 = "^3.7"
pydenticon = "^0.3.1"
pylint = "^2.2"
pylint-django = "^2.0"
Faker = "^1.0"
coverage = "^4.5"
django-template-check = "~0.3.1"
factory_boy = "~2.11"
flake8 = "~3.7"
pydenticon = "~0.3.1"
pylint = "~2.3"
pylint-django = "~2.0"
Faker = "~1.0"
coverage = "~4.5"
[build-system]
requires = ["poetry>=0.12"]
......
......@@ -21,7 +21,7 @@ class NextCloudUsersView(ListAPIView):
serializer_class = NextCloudMemberSerializer
def get_queryset(self):
perm = Permission.objects.get(content_type__app_label='auth',
perm = Permission.objects.get(content_type__app_label='members',
codename='nextcloud_admin')
return super().get_queryset().filter(
Q(pk__in=MemberGroupMembership.active_objects.values_list(
......@@ -45,7 +45,7 @@ class NextCloudGroupsView(ListAPIView):
def list(self, request, *args, **kwargs):
response = super().list(request, *args, **kwargs)
perm = Permission.objects.get(content_type__app_label='auth',
perm = Permission.objects.get(content_type__app_label='members',
codename='nextcloud_admin')
admin_users = Member.current_members.filter(
Q(is_superuser=True) |
......
......@@ -11,5 +11,5 @@ class SentryIdentityPermission(permissions.BasePermission):
def has_permission(self, request, view):
if 'secret' in request.GET:
return (request.GET['secret'] == settings.MEMBERS_SENTRY_API_SECRET
and request.user.has_perm('auth.sentry_access'))
and request.user.has_perm('members.sentry_access'))
return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment