django-pfx 1.4.dev96__tar.gz → 1.4.dev100__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/PKG-INFO +1 -1
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/django_pfx.egg-info/PKG-INFO +1 -1
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/django_pfx.egg-info/SOURCES.txt +1 -0
- django_pfx-1.4.dev100/pfx/pfxcore/apps.py +96 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/default_settings.py +0 -1
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/pfx_models.py +9 -0
- django_pfx-1.4.dev100/tests/apps.py +7 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_post_migrate_groups_update.py +23 -34
- django_pfx-1.4.dev96/pfx/pfxcore/apps.py +0 -36
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/.gitignore +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/.gitlab-ci.yml +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/.pre-commit-config.yaml +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/LICENSE +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/MANIFEST.in +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/README.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/django_pfx.egg-info/dependency_links.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/django_pfx.egg-info/requires.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/django_pfx.egg-info/top_level.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/Makefile +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/conf.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/index.rst +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/api.views.rst +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/authentication.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/decorator.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/generate_openapi.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/getting_started.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/internationalisation.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/model.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/pfx_views.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/profiling.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/settings.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/doc/source/testing.md +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/img/pfx.png +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/img/pfx.svg +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/make_messages +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/manage.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/apidoc/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/apidoc/parameters.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/apidoc/schema.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/apidoc/tags.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/decorator/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/decorator/rest.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/exceptions.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/fields.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/http/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/http/json_response.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/management/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/management/commands/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/management/commands/makeapidoc.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/management/commands/profile.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/middleware/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/middleware/authentication.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/middleware/locale.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/middleware/profiling.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/0002_pfxpermissionsuser.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/0003_delete_pfxpermissionsuser.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/operations/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/operations/permissions.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/abstract_pfx_base_user.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/cache_mixins.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/login_ban.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/not_null_fields.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/ordered_model_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/otp_user_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/pfx_user.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/user_filtered_queryset_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/serializers/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/serializers/json.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/settings.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/shortcuts.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/storage/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/storage/s3_storage.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/otp_code_email.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/otp_code_subject.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/password_reset_email.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/password_reset_subject.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/welcome_email.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/welcome_subject.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/test.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/urls.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/authentication_views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/fields.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/filters_views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/locale_views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/ordered_rest_view_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/date_format.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/groups.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/list_count.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/list_items.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/list_mode.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/list_order.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/list_search.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/media_redirect.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/meta_fields.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/meta_filters.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/meta_orders.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_limit.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_offset.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_page.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_page_size.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_page_subset.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/rest_views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/settings/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/settings/dev.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pyproject.toml +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/requirements.txt +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/serve-doc +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/setup.cfg +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/setup.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/models.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/ci.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/common.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/dev.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/dev_custom_example.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/settings/dev_default.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/basic_api_errors.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/basic_api_test.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_api_doc.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_api_doc_search.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_auth_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_body_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_cache.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_client.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_fields_choices.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_fields_minutes_duration.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_filters.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_locale_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_ordered_rest_view_mixin.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_perm_tests.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_permissions.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_perms_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_profiling_middleware.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_settings.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_shortcuts.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_timezone_middleware.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_tools.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_user_queryset.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_view_decorators.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_view_fields.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/urls.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/ci.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/common.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/dev.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/dev_custom_example.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/dev_default.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/tests/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/tests/test_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/tests/test_auth_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/urls.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/views.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/models.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/ci.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/common.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/dev.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/dev_custom_example.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/dev_default.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/tests/__init__.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/tests/test_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/tests/test_auth_api.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/urls.py +0 -0
- {django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/views.py +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import inspect
|
|
2
|
+
import logging
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from django import apps
|
|
6
|
+
from django.apps import AppConfig
|
|
7
|
+
from django.db.models.signals import post_migrate
|
|
8
|
+
|
|
9
|
+
import yaml
|
|
10
|
+
|
|
11
|
+
from pfx.pfxcore.shortcuts import permissions, settings
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def update_groups_permissions(
|
|
17
|
+
groups, base_path, group_cache, is_last, module, out=True):
|
|
18
|
+
from django.contrib.auth.models import Group
|
|
19
|
+
|
|
20
|
+
out and print(f"Import file {base_path}/groups.yaml", end=" ")
|
|
21
|
+
todo = False
|
|
22
|
+
|
|
23
|
+
def log(txt):
|
|
24
|
+
if not out:
|
|
25
|
+
return
|
|
26
|
+
nonlocal todo
|
|
27
|
+
if not todo:
|
|
28
|
+
print()
|
|
29
|
+
todo = True
|
|
30
|
+
print(" * ", txt)
|
|
31
|
+
|
|
32
|
+
db_groups = {g.name: g for g in Group.objects.all()}
|
|
33
|
+
|
|
34
|
+
for name, perms in groups.items():
|
|
35
|
+
group_cache.add(name)
|
|
36
|
+
created = name not in db_groups
|
|
37
|
+
group = Group.objects.create(name=name) if created else db_groups[name]
|
|
38
|
+
if created:
|
|
39
|
+
log(f"Create group {name}")
|
|
40
|
+
current_perms = {
|
|
41
|
+
f'{p.content_type.app_label}.{p.codename}'
|
|
42
|
+
for p in group.permissions.filter(content_type__app_label=module)}
|
|
43
|
+
if created or not settings.PFX_AUTH_GROUPS_CREATE_ONLY:
|
|
44
|
+
to_add = set(perms) - current_perms
|
|
45
|
+
to_remove = current_perms - set(perms)
|
|
46
|
+
if to_add:
|
|
47
|
+
log(f"Add permissions for group {name}: {', '.join(to_add)}")
|
|
48
|
+
group.permissions.add(*permissions(*to_add))
|
|
49
|
+
if to_remove:
|
|
50
|
+
log(f"Remove permissions for group {name}: "
|
|
51
|
+
f"{', '.join(to_remove)}")
|
|
52
|
+
group.permissions.remove(*permissions(*to_remove))
|
|
53
|
+
|
|
54
|
+
if is_last and not settings.PFX_AUTH_GROUPS_CREATE_ONLY:
|
|
55
|
+
names = db_groups.keys() - group_cache
|
|
56
|
+
if names:
|
|
57
|
+
log(f"Delete groups: {', '.join(names)}")
|
|
58
|
+
Group.objects.filter(name__in=names).delete()
|
|
59
|
+
|
|
60
|
+
if not todo:
|
|
61
|
+
out and print("[nothing to do]")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def update_groups_permissions_action(sender, **kwargs):
|
|
65
|
+
if not isinstance(sender, PfxAppConfig):
|
|
66
|
+
return
|
|
67
|
+
|
|
68
|
+
base_path = '/'.join(sender.__class__.__module__.split('.')[:-1])
|
|
69
|
+
is_last = [
|
|
70
|
+
a for a in apps.apps.get_app_configs()
|
|
71
|
+
if isinstance(a, PfxAppConfig)][-1].name == sender.name
|
|
72
|
+
module = Path(inspect.getfile(sender.__class__)).parent.name
|
|
73
|
+
|
|
74
|
+
groups_file = Path(
|
|
75
|
+
Path(inspect.getfile(sender.__class__)).parent, 'groups.yaml')
|
|
76
|
+
if not groups_file.exists():
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
with groups_file.open() as file:
|
|
80
|
+
groups = yaml.safe_load(file)
|
|
81
|
+
|
|
82
|
+
update_groups_permissions(
|
|
83
|
+
groups, base_path, sender._processed_groups, is_last, module)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class PfxAppConfig(AppConfig):
|
|
87
|
+
_processed_groups = set()
|
|
88
|
+
|
|
89
|
+
def ready(self):
|
|
90
|
+
post_migrate.connect(update_groups_permissions_action, sender=self)
|
|
91
|
+
return super().ready()
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class PfxCoreConfig(AppConfig):
|
|
95
|
+
name = 'pfx.pfxcore'
|
|
96
|
+
default = True
|
|
@@ -23,8 +23,12 @@ class UniqueConstraint(models.UniqueConstraint):
|
|
|
23
23
|
class JSONReprMixin():
|
|
24
24
|
"""A model mixin to manage JSON representation."""
|
|
25
25
|
api = None
|
|
26
|
+
url = None
|
|
26
27
|
apidoc = {}
|
|
27
28
|
|
|
29
|
+
def get_url(self):
|
|
30
|
+
return self.url
|
|
31
|
+
|
|
28
32
|
def json_repr(self, **values):
|
|
29
33
|
"""Return the JSON representation of a mode instance.
|
|
30
34
|
|
|
@@ -39,6 +43,11 @@ class JSONReprMixin():
|
|
|
39
43
|
res['resource_slug'] = self.slug
|
|
40
44
|
if hasattr(self, 'reference'):
|
|
41
45
|
res['resource_reference'] = self.reference
|
|
46
|
+
if self.api:
|
|
47
|
+
res['resource_api'] = f"{self.api}/{self.pk}"
|
|
48
|
+
url = self.get_url()
|
|
49
|
+
if url:
|
|
50
|
+
res['resource_url'] = f"{url}/{self.pk}"
|
|
42
51
|
res.update(**values)
|
|
43
52
|
return res
|
|
44
53
|
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests/tests/test_post_migrate_groups_update.py
RENAMED
|
@@ -8,16 +8,13 @@ from pfx.pfxcore.test import TestAssertMixin
|
|
|
8
8
|
|
|
9
9
|
class TestPostMigrateGroupsUpdate(TestAssertMixin, TestCase):
|
|
10
10
|
|
|
11
|
-
@override_settings(PFX_AUTH_GROUPS=dict(
|
|
12
|
-
reader=[
|
|
13
|
-
'tests.view_author',
|
|
14
|
-
],
|
|
15
|
-
editor=[
|
|
16
|
-
'tests.view_author',
|
|
17
|
-
'tests.add_author',
|
|
18
|
-
]))
|
|
19
11
|
def test_groups(self):
|
|
20
|
-
update_groups_permissions(
|
|
12
|
+
update_groups_permissions(dict(
|
|
13
|
+
reader=[
|
|
14
|
+
'tests.view_author'],
|
|
15
|
+
editor=[
|
|
16
|
+
'tests.view_author',
|
|
17
|
+
'tests.add_author']), 'tests', set(), True, 'tests', False)
|
|
21
18
|
|
|
22
19
|
groups = {g.name: g for g in Group.objects.all()}
|
|
23
20
|
self.assertEqual(groups.keys(), {'reader', 'editor'})
|
|
@@ -26,14 +23,11 @@ class TestPostMigrateGroupsUpdate(TestAssertMixin, TestCase):
|
|
|
26
23
|
perms = {p.codename for p in groups['editor'].permissions.all()}
|
|
27
24
|
self.assertEqual(perms, {'view_author', 'add_author'})
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
],
|
|
35
|
-
new=[])):
|
|
36
|
-
update_groups_permissions(self)
|
|
26
|
+
update_groups_permissions(dict(
|
|
27
|
+
editor=[
|
|
28
|
+
'tests.view_author',
|
|
29
|
+
'tests.change_author'],
|
|
30
|
+
new=[]), 'tests', set(), True, 'tests', False)
|
|
37
31
|
|
|
38
32
|
groups = {g.name: g for g in Group.objects.all()}
|
|
39
33
|
self.assertEqual(groups.keys(), {'editor', 'new'})
|
|
@@ -42,16 +36,14 @@ class TestPostMigrateGroupsUpdate(TestAssertMixin, TestCase):
|
|
|
42
36
|
perms = {p.codename for p in groups['new'].permissions.all()}
|
|
43
37
|
self.assertEqual(perms, set())
|
|
44
38
|
|
|
45
|
-
@override_settings(
|
|
46
|
-
reader=[
|
|
47
|
-
'tests.view_author',
|
|
48
|
-
],
|
|
49
|
-
editor=[
|
|
50
|
-
'tests.view_author',
|
|
51
|
-
'tests.add_author',
|
|
52
|
-
]), PFX_AUTH_GROUPS_CREATE_ONLY=True)
|
|
39
|
+
@override_settings(PFX_AUTH_GROUPS_CREATE_ONLY=True)
|
|
53
40
|
def test_groups_create_only(self):
|
|
54
|
-
update_groups_permissions(
|
|
41
|
+
update_groups_permissions(dict(
|
|
42
|
+
reader=[
|
|
43
|
+
'tests.view_author'],
|
|
44
|
+
editor=[
|
|
45
|
+
'tests.view_author',
|
|
46
|
+
'tests.add_author']), 'tests', set(), True, 'tests', False)
|
|
55
47
|
|
|
56
48
|
groups = {g.name: g for g in Group.objects.all()}
|
|
57
49
|
self.assertEqual(groups.keys(), {'reader', 'editor'})
|
|
@@ -60,14 +52,11 @@ class TestPostMigrateGroupsUpdate(TestAssertMixin, TestCase):
|
|
|
60
52
|
perms = {p.codename for p in groups['editor'].permissions.all()}
|
|
61
53
|
self.assertEqual(perms, {'view_author', 'add_author'})
|
|
62
54
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
],
|
|
69
|
-
new=[])):
|
|
70
|
-
update_groups_permissions(self)
|
|
55
|
+
update_groups_permissions(dict(
|
|
56
|
+
editor=[
|
|
57
|
+
'tests.view_author',
|
|
58
|
+
'tests.change_author'],
|
|
59
|
+
new=[]), 'tests', set(), True, 'tests', False)
|
|
71
60
|
|
|
72
61
|
groups = {g.name: g for g in Group.objects.all()}
|
|
73
62
|
self.assertEqual(groups.keys(), {'reader', 'editor', 'new'})
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
from django.apps import AppConfig
|
|
4
|
-
from django.db.models.signals import post_migrate
|
|
5
|
-
|
|
6
|
-
from pfx.pfxcore.shortcuts import permissions, settings
|
|
7
|
-
|
|
8
|
-
logger = logging.getLogger(__name__)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def update_groups_permissions(sender, **kwargs):
|
|
12
|
-
from django.contrib.auth.models import Group
|
|
13
|
-
|
|
14
|
-
groups = {g.name: g for g in Group.objects.all()}
|
|
15
|
-
|
|
16
|
-
for name, perms in settings.PFX_AUTH_GROUPS.items():
|
|
17
|
-
created = name not in groups
|
|
18
|
-
group = Group.objects.create(name=name) if created else groups[name]
|
|
19
|
-
if created or not settings.PFX_AUTH_GROUPS_CREATE_ONLY:
|
|
20
|
-
group.permissions.set(permissions(*perms))
|
|
21
|
-
|
|
22
|
-
if not settings.PFX_AUTH_GROUPS_CREATE_ONLY:
|
|
23
|
-
names = groups.keys() - settings.PFX_AUTH_GROUPS.keys()
|
|
24
|
-
Group.objects.filter(name__in=names).delete()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class PfxAppConfig(AppConfig):
|
|
28
|
-
def ready(self):
|
|
29
|
-
if settings.PFX_AUTH_GROUPS is not None:
|
|
30
|
-
post_migrate.connect(update_groups_permissions, sender=self)
|
|
31
|
-
return super().ready()
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class PfxCoreConfig(AppConfig):
|
|
35
|
-
name = 'pfx.pfxcore'
|
|
36
|
-
default = True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/management/commands/makeapidoc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/0002_pfxpermissionsuser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/operations/__init__.py
RENAMED
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/migrations/operations/permissions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/models/user_filtered_queryset_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/otp_code_email.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/templates/registration/welcome_email.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/media_redirect.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_offset.py
RENAMED
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_page_size.py
RENAMED
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/pfx/pfxcore/views/parameters/subset_page_subset.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_base_user/settings/dev_custom_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev96 → django_pfx-1.4.dev100}/tests_custom_user/settings/dev_custom_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|