diff --git a/requirements/base.in b/requirements/base.in index 73fca464..a7bf6daf 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1,38 +1 @@ -# Core python libraries -glom # data represenation based on spec -Pillow # handle images -psycopg2 # database driver -pytz # handle timezones -python-dotenv # environment variables for secrets -python-decouple # processing of envvar configs -jsonschema - -# Framework libraries -django~=3.2 -django-admin-index -django-axes -django-choices -django-hijack -django-hijack-admin -django-redis -django-rosetta -django-sniplates -maykin-django-two-factor-auth -maykin-django-two-factor-auth[phonenumbers] -mozilla-django-oidc-db - -# API libraries -djangorestframework -djangorestframework-gis -# django-extra-fields -django-filter -drf-spectacular # api documentation - -# WSGI servers & monitoring - production oriented -uwsgi -sentry-sdk # error monitoring -elastic-apm # Elastic APM integration - -# Common ground libraries -commonground-api-common[markdown_docs] -zgw-consumers # external api auths +git+https://github.com/stevenbal/open-api-dependencies.git@feature/objecttypes-compat#egg=open_api_framework diff --git a/requirements/base.txt b/requirements/base.txt index 687a325a..02515e98 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -42,7 +42,7 @@ click-plugins==1.1.1 click-repl==0.3.0 # via celery commonground-api-common[markdown-docs,markdown_docs]==1.12.1 - # via -r requirements/base.in + # via open-api-framework coreapi==2.3.3 # via # commonground-api-common @@ -58,7 +58,6 @@ cryptography==3.4.8 # pyopenssl django==3.2.23 # via - # -r requirements/base.in # commonground-api-common # django-axes # django-choices @@ -83,31 +82,27 @@ django==3.2.23 # mozilla-django-oidc # mozilla-django-oidc-db # notifications-api-common + # open-api-framework + # sharing-configs # zgw-consumers django-admin-index==1.5.0 - # via -r requirements/base.in + # via open-api-framework django-axes==5.14.0 - # via -r requirements/base.in + # via open-api-framework django-better-admin-arrayfield==1.4.2 # via mozilla-django-oidc-db django-choices==1.7.1 # via - # -r requirements/base.in + # open-api-framework # zgw-consumers -django-compat==1.0.15 - # via django-hijack-admin django-filter==2.4.0 # via - # -r requirements/base.in # commonground-api-common + # open-api-framework django-formtools==2.3 # via maykin-django-two-factor-auth -django-hijack==2.3.0 - # via - # -r requirements/base.in - # django-hijack-admin -django-hijack-admin==2.1.10 - # via -r requirements/base.in +django-hijack==3.4.5 + # via open-api-framework django-ipware==3.0.2 # via django-axes django-markup==1.3 @@ -121,46 +116,49 @@ django-phonenumber-field==5.2.0 django-privates==2.0.0.post0 # via zgw-consumers django-redis==4.12.1 - # via -r requirements/base.in + # via open-api-framework django-relativedelta==1.1.2 # via zgw-consumers django-rest-framework-condition==0.1.1 # via commonground-api-common django-rosetta==0.9.6 - # via -r requirements/base.in + # via open-api-framework django-sendfile2==0.7.0 # via django-privates django-sniplates==0.7.0 - # via -r requirements/base.in + # via open-api-framework django-solo==1.1.5 # via # commonground-api-common # mozilla-django-oidc-db # notifications-api-common + # sharing-configs # zgw-consumers djangorestframework==3.12.4 # via - # -r requirements/base.in # commonground-api-common # djangorestframework-gis # drf-nested-routers # drf-spectacular # drf-yasg # notifications-api-common + # open-api-framework djangorestframework-camel-case==1.2.0 # via # commonground-api-common # notifications-api-common djangorestframework-gis==0.17 - # via -r requirements/base.in + # via open-api-framework drf-nested-routers==0.93.3 - # via commonground-api-common + # via + # commonground-api-common + # open-api-framework drf-spectacular==0.16.0 - # via -r requirements/base.in + # via open-api-framework drf-yasg==1.20.0 # via commonground-api-common elastic-apm==6.1.1 - # via -r requirements/base.in + # via open-api-framework face==20.1.1 # via glom faker==8.1.0 @@ -171,7 +169,7 @@ gemma-zds-client==1.0.0 # notifications-api-common # zgw-consumers glom==20.11.0 - # via -r requirements/base.in + # via open-api-framework idna==2.10 # via requests importlib-metadata==7.0.1 @@ -192,8 +190,8 @@ josepy==1.9.0 # via mozilla-django-oidc jsonschema==3.2.0 # via - # -r requirements/base.in # drf-spectacular + # open-api-framework kombu==5.3.5 # via celery markdown==3.5.2 @@ -201,13 +199,15 @@ markdown==3.5.2 markupsafe==1.1.1 # via jinja2 maykin-django-two-factor-auth[phonenumbers]==2.0.4 - # via -r requirements/base.in + # via open-api-framework mozilla-django-oidc==1.2.4 # via mozilla-django-oidc-db mozilla-django-oidc-db==0.7.2 - # via -r requirements/base.in + # via open-api-framework notifications-api-common==0.2.2 # via commonground-api-common +open-api-framework @ git+https://github.com/stevenbal/open-api-dependencies.git@feature/objecttypes-compat + # via -r requirements/base.in oyaml==1.0 # via commonground-api-common packaging==23.2 @@ -215,15 +215,15 @@ packaging==23.2 phonenumbers==8.12.29 # via maykin-django-two-factor-auth pillow==9.0.1 - # via -r requirements/base.in + # via open-api-framework polib==1.1.1 # via django-rosetta prompt-toolkit==3.0.43 # via click-repl psycopg2==2.8.6 # via - # -r requirements/base.in # mozilla-django-oidc-db + # open-api-framework pycparser==2.20 # via cffi pyjwt==2.4.0 @@ -241,14 +241,14 @@ python-dateutil==2.8.1 # django-relativedelta # faker python-decouple==3.4 - # via -r requirements/base.in + # via open-api-framework python-dotenv==0.17.0 - # via -r requirements/base.in + # via open-api-framework pytz==2021.1 # via - # -r requirements/base.in # celery # django + # open-api-framework pyyaml==5.4.1 # via # commonground-api-common @@ -267,6 +267,7 @@ requests==2.25.1 # gemma-zds-client # mozilla-django-oidc # requests-mock + # sharing-configs # zgw-consumers requests-mock==1.8.0 # via zgw-consumers @@ -275,11 +276,12 @@ ruamel-yaml==0.17.4 ruamel-yaml-clib==0.2.7 # via ruamel-yaml sentry-sdk==1.0.0 - # via -r requirements/base.in + # via open-api-framework +sharing-configs==0.1.2 + # via open-api-framework six==1.15.0 # via # django-choices - # django-compat # django-markup # django-rosetta # isodate @@ -308,7 +310,7 @@ urllib3==1.26.6 # requests # sentry-sdk uwsgi==2.0.21 - # via -r requirements/base.in + # via open-api-framework vine==5.1.0 # via # amqp @@ -318,8 +320,8 @@ wcwidth==0.2.13 # via prompt-toolkit zgw-consumers==0.20.0 # via - # -r requirements/base.in # notifications-api-common + # open-api-framework zipp==3.17.0 # via importlib-metadata diff --git a/requirements/ci.txt b/requirements/ci.txt index 2315158e..44ae9b68 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -69,6 +69,7 @@ commonground-api-common[markdown-docs]==1.12.1 # via # -r requirements/base.txt # commonground-api-common + # open-api-framework coreapi==2.3.3 # via # -r requirements/base.txt @@ -118,11 +119,17 @@ django==3.2.23 # mozilla-django-oidc # mozilla-django-oidc-db # notifications-api-common + # open-api-framework + # sharing-configs # zgw-consumers django-admin-index==1.5.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework django-axes==5.14.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework django-better-admin-arrayfield==1.4.2 # via # -r requirements/base.txt @@ -132,25 +139,21 @@ django-capture-on-commit-callbacks==1.5.0 django-choices==1.7.1 # via # -r requirements/base.txt + # open-api-framework # zgw-consumers -django-compat==1.0.15 - # via - # -r requirements/base.txt - # django-hijack-admin django-filter==2.4.0 # via # -r requirements/base.txt # commonground-api-common + # open-api-framework django-formtools==2.3 # via # -r requirements/base.txt # maykin-django-two-factor-auth -django-hijack==2.3.0 +django-hijack==3.4.5 # via # -r requirements/base.txt - # django-hijack-admin -django-hijack-admin==2.1.10 - # via -r requirements/base.txt + # open-api-framework django-ipware==3.0.2 # via # -r requirements/base.txt @@ -178,7 +181,9 @@ django-privates==2.0.0.post0 # -r requirements/base.txt # zgw-consumers django-redis==4.12.1 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework django-relativedelta==1.1.2 # via # -r requirements/base.txt @@ -188,19 +193,24 @@ django-rest-framework-condition==0.1.1 # -r requirements/base.txt # commonground-api-common django-rosetta==0.9.6 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework django-sendfile2==0.7.0 # via # -r requirements/base.txt # django-privates django-sniplates==0.7.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework django-solo==1.1.5 # via # -r requirements/base.txt # commonground-api-common # mozilla-django-oidc-db # notifications-api-common + # sharing-configs # zgw-consumers django-webtest==1.9.7 # via -r requirements/test-tools.in @@ -213,25 +223,33 @@ djangorestframework==3.12.4 # drf-spectacular # drf-yasg # notifications-api-common + # open-api-framework djangorestframework-camel-case==1.2.0 # via # -r requirements/base.txt # commonground-api-common # notifications-api-common djangorestframework-gis==0.17 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework drf-nested-routers==0.93.3 # via # -r requirements/base.txt # commonground-api-common + # open-api-framework drf-spectacular==0.16.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework drf-yasg==1.20.0 # via # -r requirements/base.txt # commonground-api-common elastic-apm==6.1.1 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework face==20.1.1 # via # -r requirements/base.txt @@ -252,7 +270,9 @@ gemma-zds-client==1.0.0 # notifications-api-common # zgw-consumers glom==20.11.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework idna==2.10 # via # -r requirements/base.txt @@ -290,6 +310,7 @@ jsonschema==3.2.0 # via # -r requirements/base.txt # drf-spectacular + # open-api-framework kombu==5.3.5 # via # -r requirements/base.txt @@ -308,16 +329,21 @@ maykin-django-two-factor-auth[phonenumbers]==2.0.4 # via # -r requirements/base.txt # maykin-django-two-factor-auth + # open-api-framework mozilla-django-oidc==1.2.4 # via # -r requirements/base.txt # mozilla-django-oidc-db mozilla-django-oidc-db==0.7.2 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework notifications-api-common==0.2.2 # via # -r requirements/base.txt # commonground-api-common +open-api-framework @ git+https://github.com/stevenbal/open-api-dependencies.git@feature/objecttypes-compat + # via -r requirements/base.txt oyaml==1.0 # via # -r requirements/base.txt @@ -331,7 +357,9 @@ phonenumbers==8.12.29 # -r requirements/base.txt # maykin-django-two-factor-auth pillow==9.0.1 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework polib==1.1.1 # via # -r requirements/base.txt @@ -344,6 +372,7 @@ psycopg2==2.8.6 # via # -r requirements/base.txt # mozilla-django-oidc-db + # open-api-framework pycparser==2.20 # via # -r requirements/base.txt @@ -371,14 +400,19 @@ python-dateutil==2.8.1 # faker # freezegun python-decouple==3.4 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework python-dotenv==0.17.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework pytz==2021.1 # via # -r requirements/base.txt # celery # django + # open-api-framework pyyaml==5.4.1 # via # -r requirements/base.txt @@ -403,6 +437,7 @@ requests==2.25.1 # gemma-zds-client # mozilla-django-oidc # requests-mock + # sharing-configs # zgw-consumers requests-mock==1.8.0 # via @@ -418,12 +453,17 @@ ruamel-yaml-clib==0.2.7 # -r requirements/base.txt # ruamel-yaml sentry-sdk==1.0.0 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework +sharing-configs==0.1.2 + # via + # -r requirements/base.txt + # open-api-framework six==1.15.0 # via # -r requirements/base.txt # django-choices - # django-compat # django-markup # django-rosetta # isodate @@ -464,7 +504,9 @@ urllib3==1.26.6 # requests # sentry-sdk uwsgi==2.0.21 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # open-api-framework vine==5.1.0 # via # -r requirements/base.txt @@ -485,6 +527,7 @@ zgw-consumers==0.20.0 # via # -r requirements/base.txt # notifications-api-common + # open-api-framework zipp==3.17.0 # via # -r requirements/base.txt diff --git a/requirements/dev.txt b/requirements/dev.txt index c8ef1b8b..ff60dc9b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -85,6 +85,7 @@ commonground-api-common[markdown-docs]==1.12.1 # via # -r requirements/ci.txt # commonground-api-common + # open-api-framework commonmark==0.9.1 # via recommonmark coreapi==2.3.3 @@ -140,11 +141,17 @@ django==3.2.23 # mozilla-django-oidc # mozilla-django-oidc-db # notifications-api-common + # open-api-framework + # sharing-configs # zgw-consumers django-admin-index==1.5.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework django-axes==5.14.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework django-better-admin-arrayfield==1.4.2 # via # -r requirements/ci.txt @@ -154,11 +161,8 @@ django-capture-on-commit-callbacks==1.5.0 django-choices==1.7.1 # via # -r requirements/ci.txt + # open-api-framework # zgw-consumers -django-compat==1.0.15 - # via - # -r requirements/ci.txt - # django-hijack-admin django-debug-toolbar==3.2.1 # via -r requirements/dev.in django-extensions==3.1.2 @@ -167,16 +171,15 @@ django-filter==2.4.0 # via # -r requirements/ci.txt # commonground-api-common + # open-api-framework django-formtools==2.3 # via # -r requirements/ci.txt # maykin-django-two-factor-auth -django-hijack==2.3.0 +django-hijack==3.4.5 # via # -r requirements/ci.txt - # django-hijack-admin -django-hijack-admin==2.1.10 - # via -r requirements/ci.txt + # open-api-framework django-ipware==3.0.2 # via # -r requirements/ci.txt @@ -202,7 +205,9 @@ django-privates==2.0.0.post0 # -r requirements/ci.txt # zgw-consumers django-redis==4.12.1 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework django-relativedelta==1.1.2 # via # -r requirements/ci.txt @@ -212,19 +217,24 @@ django-rest-framework-condition==0.1.1 # -r requirements/ci.txt # commonground-api-common django-rosetta==0.9.6 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework django-sendfile2==0.7.0 # via # -r requirements/ci.txt # django-privates django-sniplates==0.7.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework django-solo==1.1.5 # via # -r requirements/ci.txt # commonground-api-common # mozilla-django-oidc-db # notifications-api-common + # sharing-configs # zgw-consumers django-webtest==1.9.7 # via -r requirements/ci.txt @@ -237,13 +247,16 @@ djangorestframework==3.12.4 # drf-spectacular # drf-yasg # notifications-api-common + # open-api-framework djangorestframework-camel-case==1.2.0 # via # -r requirements/ci.txt # commonground-api-common # notifications-api-common djangorestframework-gis==0.17 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework docutils==0.16 # via # recommonmark @@ -253,14 +266,19 @@ drf-nested-routers==0.93.3 # via # -r requirements/ci.txt # commonground-api-common + # open-api-framework drf-spectacular==0.16.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework drf-yasg==1.20.0 # via # -r requirements/ci.txt # commonground-api-common elastic-apm==6.1.1 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework face==20.1.1 # via # -r requirements/ci.txt @@ -283,7 +301,9 @@ gemma-zds-client==1.0.0 # notifications-api-common # zgw-consumers glom==20.11.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework idna==2.10 # via # -r requirements/ci.txt @@ -327,6 +347,7 @@ jsonschema==3.2.0 # via # -r requirements/ci.txt # drf-spectacular + # open-api-framework kombu==5.3.5 # via # -r requirements/ci.txt @@ -345,6 +366,7 @@ maykin-django-two-factor-auth[phonenumbers]==2.0.4 # via # -r requirements/ci.txt # maykin-django-two-factor-auth + # open-api-framework mccabe==0.6.1 # via flake8 mozilla-django-oidc==1.2.4 @@ -352,13 +374,17 @@ mozilla-django-oidc==1.2.4 # -r requirements/ci.txt # mozilla-django-oidc-db mozilla-django-oidc-db==0.7.2 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework mypy-extensions==0.4.3 # via black notifications-api-common==0.2.2 # via # -r requirements/ci.txt # commonground-api-common +open-api-framework @ git+https://github.com/stevenbal/open-api-dependencies.git@feature/objecttypes-compat + # via -r requirements/ci.txt oyaml==1.0 # via # -r requirements/ci.txt @@ -377,7 +403,9 @@ phonenumbers==8.12.29 # -r requirements/ci.txt # maykin-django-two-factor-auth pillow==9.0.1 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework pip-tools==7.3.0 # via -r requirements/dev.in platformdirs==4.0.0 @@ -394,6 +422,7 @@ psycopg2==2.8.6 # via # -r requirements/ci.txt # mozilla-django-oidc-db + # open-api-framework pycodestyle==2.7.0 # via flake8 pycparser==2.20 @@ -431,15 +460,20 @@ python-dateutil==2.8.1 # faker # freezegun python-decouple==3.4 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework python-dotenv==0.17.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework pytz==2021.1 # via # -r requirements/ci.txt # babel # celery # django + # open-api-framework pyyaml==5.4.1 # via # -r requirements/ci.txt @@ -466,6 +500,7 @@ requests==2.25.1 # gemma-zds-client # mozilla-django-oidc # requests-mock + # sharing-configs # sphinx # zgw-consumers requests-mock==1.8.0 @@ -481,12 +516,17 @@ ruamel-yaml-clib==0.2.7 # -r requirements/ci.txt # ruamel-yaml sentry-sdk==1.0.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework +sharing-configs==0.1.2 + # via + # -r requirements/ci.txt + # open-api-framework six==1.15.0 # via # -r requirements/ci.txt # django-choices - # django-compat # django-markup # django-rosetta # isodate @@ -561,7 +601,9 @@ urllib3==1.26.6 # requests # sentry-sdk uwsgi==2.0.21 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # open-api-framework vine==5.1.0 # via # -r requirements/ci.txt @@ -590,6 +632,7 @@ zgw-consumers==0.20.0 # via # -r requirements/ci.txt # notifications-api-common + # open-api-framework zipp==3.17.0 # via # -r requirements/ci.txt diff --git a/src/objects/accounts/admin.py b/src/objects/accounts/admin.py index 4af220fa..00d28115 100644 --- a/src/objects/accounts/admin.py +++ b/src/objects/accounts/admin.py @@ -1,11 +1,9 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin -from hijack_admin.admin import HijackUserAdminMixin - from .models import User @admin.register(User) -class _UserAdmin(UserAdmin, HijackUserAdminMixin): - list_display = UserAdmin.list_display + ("hijack_field",) +class _UserAdmin(UserAdmin): + pass diff --git a/src/objects/conf/base.py b/src/objects/conf/base.py index b44e1ef8..b763756e 100644 --- a/src/objects/conf/base.py +++ b/src/objects/conf/base.py @@ -72,8 +72,7 @@ "drf_spectacular", "sniplates", "hijack", - "compat", # Part of hijack - "hijack_admin", + "hijack.contrib.admin", "mozilla_django_oidc", "mozilla_django_oidc_db", "rest_framework",