django-pfx 1.1.dev2__tar.gz → 1.2__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.1.dev2 → django-pfx-1.2}/.gitignore +4 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/.gitlab-ci.yml +39 -4
- django-pfx-1.2/PKG-INFO +65 -0
- django-pfx-1.2/README.md +27 -0
- django-pfx-1.2/django_pfx.egg-info/PKG-INFO +65 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/django_pfx.egg-info/SOURCES.txt +48 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/django_pfx.egg-info/requires.txt +5 -2
- {django-pfx-1.1.dev2 → django-pfx-1.2}/django_pfx.egg-info/top_level.txt +1 -0
- django-pfx-1.2/doc/Makefile +20 -0
- django-pfx-1.2/doc/conf.py +81 -0
- django-pfx-1.2/doc/index.rst +35 -0
- django-pfx-1.2/doc/source/api.views.rst +137 -0
- django-pfx-1.2/doc/source/authentication.md +193 -0
- django-pfx-1.2/doc/source/decorator.md +73 -0
- django-pfx-1.2/doc/source/generate_openapi.md +248 -0
- django-pfx-1.2/doc/source/getting_started.md +179 -0
- django-pfx-1.2/doc/source/internationalisation.md +41 -0
- django-pfx-1.2/doc/source/model.md +120 -0
- django-pfx-1.2/doc/source/pfx_views.md +302 -0
- django-pfx-1.2/doc/source/profiling.md +169 -0
- django-pfx-1.2/doc/source/settings.md +65 -0
- django-pfx-1.2/doc/source/testing.md +342 -0
- django-pfx-1.2/pfx/pfxcore/__init__.py +5 -0
- django-pfx-1.2/pfx/pfxcore/apidoc/__init__.py +11 -0
- django-pfx-1.2/pfx/pfxcore/apidoc/parameters.py +46 -0
- django-pfx-1.2/pfx/pfxcore/apidoc/schema.py +89 -0
- django-pfx-1.2/pfx/pfxcore/apidoc/tags.py +10 -0
- django-pfx-1.2/pfx/pfxcore/decorator/__init__.py +1 -0
- django-pfx-1.2/pfx/pfxcore/decorator/rest.py +83 -0
- django-pfx-1.2/pfx/pfxcore/default_settings.py +15 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/fields.py +4 -0
- django-pfx-1.2/pfx/pfxcore/management/commands/makeapidoc.py +216 -0
- django-pfx-1.2/pfx/pfxcore/management/commands/profile.py +64 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/middleware/__init__.py +1 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/middleware/authentication.py +32 -15
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/middleware/locale.py +36 -6
- django-pfx-1.2/pfx/pfxcore/middleware/profiling.py +88 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/models/__init__.py +5 -1
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/models/cache_mixins.py +7 -5
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/models/not_null_fields.py +4 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/models/pfx_models.py +35 -0
- django-pfx-1.2/pfx/pfxcore/settings.py +11 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/shortcuts.py +18 -2
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/test.py +135 -68
- django-pfx-1.2/pfx/pfxcore/urls.py +7 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/views/__init__.py +1 -0
- django-pfx-1.2/pfx/pfxcore/views/authentication_views.py +558 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/views/fields.py +138 -17
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/views/filters_views.py +34 -14
- django-pfx-1.2/pfx/pfxcore/views/locale_views.py +68 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/__init__.py +17 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/date_format.py +19 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/groups.py +36 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/list_count.py +17 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/list_items.py +16 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/list_mode.py +14 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/list_order.py +19 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/list_search.py +13 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/media_redirect.py +11 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/meta_fields.py +13 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/meta_filters.py +13 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/meta_orders.py +13 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset.py +35 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset_limit.py +17 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset_offset.py +14 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset_page.py +14 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset_page_size.py +17 -0
- django-pfx-1.2/pfx/pfxcore/views/parameters/subset_page_subset.py +16 -0
- django-pfx-1.2/pfx/pfxcore/views/rest_views.py +1303 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/requirements.txt +6 -1
- {django-pfx-1.1.dev2 → django-pfx-1.2}/runtest.py +1 -0
- django-pfx-1.2/serve-doc +51 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/setup.cfg +11 -5
- django-pfx-1.2/tests/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/models.py +23 -1
- django-pfx-1.2/tests/settings/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/settings/common.py +3 -3
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/__init__.py +5 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/basic_api_errors.py +3 -3
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/basic_api_test.py +220 -29
- django-pfx-1.2/tests/tests/test_api_doc.py +495 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_auth_api.py +271 -71
- django-pfx-1.2/tests/tests/test_client.py +165 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_fields.py +2 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_filters.py +17 -0
- django-pfx-1.2/tests/tests/test_profiling_middleware.py +87 -0
- django-pfx-1.2/tests/tests/test_tools.py +171 -0
- django-pfx-1.2/tests/tests/test_view_decorators.py +97 -0
- django-pfx-1.2/tests/urls.py +28 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/views.py +82 -9
- django-pfx-1.1.dev2/PKG-INFO +0 -42
- django-pfx-1.1.dev2/README.md +0 -16
- django-pfx-1.1.dev2/django_pfx.egg-info/PKG-INFO +0 -42
- django-pfx-1.1.dev2/pfx/pfxcore/__init__.py +0 -1
- django-pfx-1.1.dev2/pfx/pfxcore/decorator/__init__.py +0 -1
- django-pfx-1.1.dev2/pfx/pfxcore/decorator/rest.py +0 -64
- django-pfx-1.1.dev2/pfx/pfxcore/urls.py +0 -9
- django-pfx-1.1.dev2/pfx/pfxcore/views/authentication_views.py +0 -271
- django-pfx-1.1.dev2/pfx/pfxcore/views/locale_views.py +0 -32
- django-pfx-1.1.dev2/pfx/pfxcore/views/rest_views.py +0 -499
- django-pfx-1.1.dev2/tests/tests/test_tools.py +0 -83
- django-pfx-1.1.dev2/tests/urls.py +0 -27
- {django-pfx-1.1.dev2 → django-pfx-1.2}/.pre-commit-config.yaml +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/LICENSE +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/MANIFEST.in +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/django_pfx.egg-info/dependency_links.txt +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/img/pfx.png +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/img/pfx.svg +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/apps.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/exceptions.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/http/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/http/json_response.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.po +0 -0
- {django-pfx-1.1.dev2/pfx/pfxcore/serializers → django-pfx-1.2/pfx/pfxcore/management}/__init__.py +0 -0
- {django-pfx-1.1.dev2/tests → django-pfx-1.2/pfx/pfxcore/management/commands}/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/models/user_filtered_queryset_mixin.py +0 -0
- {django-pfx-1.1.dev2/tests/settings → django-pfx-1.2/pfx/pfxcore/serializers}/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/serializers/json.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/storage/__init__.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/storage/s3_storage.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/templates/registration/password_reset_email.txt +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/templates/registration/password_reset_subject.txt +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/templates/registration/welcome_email.txt +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pfx/pfxcore/templates/registration/welcome_subject.txt +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/pyproject.toml +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/setup.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/settings/ci.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/settings/dev.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/settings/dev_custom_example.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/settings/dev_default.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_cache.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_locale_api.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_perm_tests.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_perms_api.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_shortcuts.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_timezone_middleware.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_user_queryset.py +0 -0
- {django-pfx-1.1.dev2 → django-pfx-1.2}/tests/tests/test_view_fields.py +0 -0
|
@@ -8,7 +8,7 @@ variables:
|
|
|
8
8
|
|
|
9
9
|
cache:
|
|
10
10
|
paths:
|
|
11
|
-
-
|
|
11
|
+
- .cache/pip/
|
|
12
12
|
|
|
13
13
|
before_script:
|
|
14
14
|
- python -V # Print out python version for debugging
|
|
@@ -20,6 +20,7 @@ before_script:
|
|
|
20
20
|
|
|
21
21
|
stages:
|
|
22
22
|
- test
|
|
23
|
+
- build
|
|
23
24
|
- package
|
|
24
25
|
|
|
25
26
|
test:
|
|
@@ -34,9 +35,13 @@ test:
|
|
|
34
35
|
- coverage run --source='.' runtest.py
|
|
35
36
|
- coverage report
|
|
36
37
|
- coverage xml
|
|
38
|
+
- coverage html
|
|
37
39
|
coverage: '/TOTAL.*\s([.\d]+)%/'
|
|
38
40
|
artifacts:
|
|
39
41
|
when: always
|
|
42
|
+
paths:
|
|
43
|
+
- htmlcov/**
|
|
44
|
+
expire_in: 7 day
|
|
40
45
|
reports:
|
|
41
46
|
junit: testreport.xml
|
|
42
47
|
coverage_report:
|
|
@@ -46,9 +51,39 @@ test:
|
|
|
46
51
|
matrix:
|
|
47
52
|
- DJANGO_VERSION: 'Django==3.2.*' # LTS
|
|
48
53
|
- DJANGO_VERSION: 'Django>=3.2,<4.0'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
- DJANGO_VERSION: 'Django>=4.0,<5.0'
|
|
55
|
+
- DJANGO_VERSION: 'Django>=4.2.*' # LTS
|
|
56
|
+
|
|
57
|
+
build doc:
|
|
58
|
+
stage: build
|
|
59
|
+
needs: []
|
|
60
|
+
interruptible: true
|
|
61
|
+
script:
|
|
62
|
+
- cd doc
|
|
63
|
+
- make html
|
|
64
|
+
artifacts:
|
|
65
|
+
when: always
|
|
66
|
+
paths:
|
|
67
|
+
- doc/_build/**
|
|
68
|
+
expire_in: 7 day
|
|
69
|
+
|
|
70
|
+
pages:
|
|
71
|
+
stage: package
|
|
72
|
+
needs:
|
|
73
|
+
- job: build doc
|
|
74
|
+
artifacts: true
|
|
75
|
+
- job: test
|
|
76
|
+
artifacts: true
|
|
77
|
+
script:
|
|
78
|
+
- mkdir public
|
|
79
|
+
- mv doc/_build/html public/doc
|
|
80
|
+
- mv htmlcov public/coverage
|
|
81
|
+
artifacts:
|
|
82
|
+
paths:
|
|
83
|
+
- public
|
|
84
|
+
only:
|
|
85
|
+
- master
|
|
86
|
+
|
|
52
87
|
package:
|
|
53
88
|
only:
|
|
54
89
|
refs:
|
django-pfx-1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: django-pfx
|
|
3
|
+
Version: 1.2
|
|
4
|
+
Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
|
|
5
|
+
Author: Hervé Martinet
|
|
6
|
+
Author-email: herve.martinet@gmail.com
|
|
7
|
+
License: BSD-3-Clause
|
|
8
|
+
Project-URL: Source, https://gitlab.com/pfx4/django-pfx
|
|
9
|
+
Project-URL: Tracker, https://gitlab.com/pfx4/django-pfx/-/issues
|
|
10
|
+
Project-URL: Documentation, https://pfx4.gitlab.io/django-pfx/doc/
|
|
11
|
+
Classifier: Environment :: Web Environment
|
|
12
|
+
Classifier: Framework :: Django
|
|
13
|
+
Classifier: Framework :: Django :: 3.2
|
|
14
|
+
Classifier: Framework :: Django :: 4.2
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
25
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: django<5.0,>=3.2
|
|
29
|
+
Requires-Dist: django-cors-headers
|
|
30
|
+
Requires-Dist: django_json_widget
|
|
31
|
+
Requires-Dist: pyjwt>=2.1
|
|
32
|
+
Requires-Dist: Babel
|
|
33
|
+
Requires-Dist: boto3
|
|
34
|
+
Requires-Dist: apispec
|
|
35
|
+
Requires-Dist: pyyaml
|
|
36
|
+
Requires-Dist: pytz
|
|
37
|
+
Requires-Dist: dill
|
|
38
|
+
|
|
39
|
+
# Django PFX
|
|
40
|
+
|
|
41
|
+
[](https://gitlab.com/pfx4/django-pfx/-/commits/master)
|
|
42
|
+
[](https://pfx4.gitlab.io/django-pfx/coverage)
|
|
43
|
+
|
|
44
|
+
![logo]
|
|
45
|
+
|
|
46
|
+
Django PFX is a toolkit designed to streamline the development of RESTful APIs
|
|
47
|
+
using the Django framework, leveraging views and the ORM (Object-Relational Mapping).
|
|
48
|
+
With a focus on simplicity and efficiency, Django PFX enables developers to rapidly
|
|
49
|
+
create robust web service APIs for web applications and simplifies the testing process.
|
|
50
|
+
|
|
51
|
+
### Key Features:
|
|
52
|
+
- Predefined CRUD API (but customizable)
|
|
53
|
+
- Internationalization
|
|
54
|
+
- Authentication & Authorization
|
|
55
|
+
- JSON-only RESTful API
|
|
56
|
+
- Flexibility
|
|
57
|
+
- Tests & Profiling Tools
|
|
58
|
+
- Automatic Open API Documentation
|
|
59
|
+
|
|
60
|
+
### Links
|
|
61
|
+
- [Source](https://gitlab.com/pfx4/django-pfx)
|
|
62
|
+
- [Issue tracker](https://gitlab.com/pfx4/django-pfx/-/issues)
|
|
63
|
+
- [Documentation](https://pfx4.gitlab.io/django-pfx/doc/)
|
|
64
|
+
|
|
65
|
+
[logo]: https://gitlab.com/pfx4/django-pfx/-/raw/master/img/pfx.png "PFX"
|
django-pfx-1.2/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Django PFX
|
|
2
|
+
|
|
3
|
+
[](https://gitlab.com/pfx4/django-pfx/-/commits/master)
|
|
4
|
+
[](https://pfx4.gitlab.io/django-pfx/coverage)
|
|
5
|
+
|
|
6
|
+
![logo]
|
|
7
|
+
|
|
8
|
+
Django PFX is a toolkit designed to streamline the development of RESTful APIs
|
|
9
|
+
using the Django framework, leveraging views and the ORM (Object-Relational Mapping).
|
|
10
|
+
With a focus on simplicity and efficiency, Django PFX enables developers to rapidly
|
|
11
|
+
create robust web service APIs for web applications and simplifies the testing process.
|
|
12
|
+
|
|
13
|
+
### Key Features:
|
|
14
|
+
- Predefined CRUD API (but customizable)
|
|
15
|
+
- Internationalization
|
|
16
|
+
- Authentication & Authorization
|
|
17
|
+
- JSON-only RESTful API
|
|
18
|
+
- Flexibility
|
|
19
|
+
- Tests & Profiling Tools
|
|
20
|
+
- Automatic Open API Documentation
|
|
21
|
+
|
|
22
|
+
### Links
|
|
23
|
+
- [Source](https://gitlab.com/pfx4/django-pfx)
|
|
24
|
+
- [Issue tracker](https://gitlab.com/pfx4/django-pfx/-/issues)
|
|
25
|
+
- [Documentation](https://pfx4.gitlab.io/django-pfx/doc/)
|
|
26
|
+
|
|
27
|
+
[logo]: https://gitlab.com/pfx4/django-pfx/-/raw/master/img/pfx.png "PFX"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: django-pfx
|
|
3
|
+
Version: 1.2
|
|
4
|
+
Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
|
|
5
|
+
Author: Hervé Martinet
|
|
6
|
+
Author-email: herve.martinet@gmail.com
|
|
7
|
+
License: BSD-3-Clause
|
|
8
|
+
Project-URL: Source, https://gitlab.com/pfx4/django-pfx
|
|
9
|
+
Project-URL: Tracker, https://gitlab.com/pfx4/django-pfx/-/issues
|
|
10
|
+
Project-URL: Documentation, https://pfx4.gitlab.io/django-pfx/doc/
|
|
11
|
+
Classifier: Environment :: Web Environment
|
|
12
|
+
Classifier: Framework :: Django
|
|
13
|
+
Classifier: Framework :: Django :: 3.2
|
|
14
|
+
Classifier: Framework :: Django :: 4.2
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
25
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: django<5.0,>=3.2
|
|
29
|
+
Requires-Dist: django-cors-headers
|
|
30
|
+
Requires-Dist: django_json_widget
|
|
31
|
+
Requires-Dist: pyjwt>=2.1
|
|
32
|
+
Requires-Dist: Babel
|
|
33
|
+
Requires-Dist: boto3
|
|
34
|
+
Requires-Dist: apispec
|
|
35
|
+
Requires-Dist: pyyaml
|
|
36
|
+
Requires-Dist: pytz
|
|
37
|
+
Requires-Dist: dill
|
|
38
|
+
|
|
39
|
+
# Django PFX
|
|
40
|
+
|
|
41
|
+
[](https://gitlab.com/pfx4/django-pfx/-/commits/master)
|
|
42
|
+
[](https://pfx4.gitlab.io/django-pfx/coverage)
|
|
43
|
+
|
|
44
|
+
![logo]
|
|
45
|
+
|
|
46
|
+
Django PFX is a toolkit designed to streamline the development of RESTful APIs
|
|
47
|
+
using the Django framework, leveraging views and the ORM (Object-Relational Mapping).
|
|
48
|
+
With a focus on simplicity and efficiency, Django PFX enables developers to rapidly
|
|
49
|
+
create robust web service APIs for web applications and simplifies the testing process.
|
|
50
|
+
|
|
51
|
+
### Key Features:
|
|
52
|
+
- Predefined CRUD API (but customizable)
|
|
53
|
+
- Internationalization
|
|
54
|
+
- Authentication & Authorization
|
|
55
|
+
- JSON-only RESTful API
|
|
56
|
+
- Flexibility
|
|
57
|
+
- Tests & Profiling Tools
|
|
58
|
+
- Automatic Open API Documentation
|
|
59
|
+
|
|
60
|
+
### Links
|
|
61
|
+
- [Source](https://gitlab.com/pfx4/django-pfx)
|
|
62
|
+
- [Issue tracker](https://gitlab.com/pfx4/django-pfx/-/issues)
|
|
63
|
+
- [Documentation](https://pfx4.gitlab.io/django-pfx/doc/)
|
|
64
|
+
|
|
65
|
+
[logo]: https://gitlab.com/pfx4/django-pfx/-/raw/master/img/pfx.png "PFX"
|
|
@@ -7,6 +7,7 @@ README.md
|
|
|
7
7
|
pyproject.toml
|
|
8
8
|
requirements.txt
|
|
9
9
|
runtest.py
|
|
10
|
+
serve-doc
|
|
10
11
|
setup.cfg
|
|
11
12
|
setup.py
|
|
12
13
|
django_pfx.egg-info/PKG-INFO
|
|
@@ -14,25 +15,50 @@ django_pfx.egg-info/SOURCES.txt
|
|
|
14
15
|
django_pfx.egg-info/dependency_links.txt
|
|
15
16
|
django_pfx.egg-info/requires.txt
|
|
16
17
|
django_pfx.egg-info/top_level.txt
|
|
18
|
+
doc/Makefile
|
|
19
|
+
doc/conf.py
|
|
20
|
+
doc/index.rst
|
|
21
|
+
doc/source/api.views.rst
|
|
22
|
+
doc/source/authentication.md
|
|
23
|
+
doc/source/decorator.md
|
|
24
|
+
doc/source/generate_openapi.md
|
|
25
|
+
doc/source/getting_started.md
|
|
26
|
+
doc/source/internationalisation.md
|
|
27
|
+
doc/source/model.md
|
|
28
|
+
doc/source/pfx_views.md
|
|
29
|
+
doc/source/profiling.md
|
|
30
|
+
doc/source/settings.md
|
|
31
|
+
doc/source/testing.md
|
|
17
32
|
img/pfx.png
|
|
18
33
|
img/pfx.svg
|
|
19
34
|
pfx/__init__.py
|
|
20
35
|
pfx/pfxcore/__init__.py
|
|
21
36
|
pfx/pfxcore/apps.py
|
|
37
|
+
pfx/pfxcore/default_settings.py
|
|
22
38
|
pfx/pfxcore/exceptions.py
|
|
23
39
|
pfx/pfxcore/fields.py
|
|
40
|
+
pfx/pfxcore/settings.py
|
|
24
41
|
pfx/pfxcore/shortcuts.py
|
|
25
42
|
pfx/pfxcore/test.py
|
|
26
43
|
pfx/pfxcore/urls.py
|
|
44
|
+
pfx/pfxcore/apidoc/__init__.py
|
|
45
|
+
pfx/pfxcore/apidoc/parameters.py
|
|
46
|
+
pfx/pfxcore/apidoc/schema.py
|
|
47
|
+
pfx/pfxcore/apidoc/tags.py
|
|
27
48
|
pfx/pfxcore/decorator/__init__.py
|
|
28
49
|
pfx/pfxcore/decorator/rest.py
|
|
29
50
|
pfx/pfxcore/http/__init__.py
|
|
30
51
|
pfx/pfxcore/http/json_response.py
|
|
31
52
|
pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo
|
|
32
53
|
pfx/pfxcore/locale/fr/LC_MESSAGES/django.po
|
|
54
|
+
pfx/pfxcore/management/__init__.py
|
|
55
|
+
pfx/pfxcore/management/commands/__init__.py
|
|
56
|
+
pfx/pfxcore/management/commands/makeapidoc.py
|
|
57
|
+
pfx/pfxcore/management/commands/profile.py
|
|
33
58
|
pfx/pfxcore/middleware/__init__.py
|
|
34
59
|
pfx/pfxcore/middleware/authentication.py
|
|
35
60
|
pfx/pfxcore/middleware/locale.py
|
|
61
|
+
pfx/pfxcore/middleware/profiling.py
|
|
36
62
|
pfx/pfxcore/models/__init__.py
|
|
37
63
|
pfx/pfxcore/models/cache_mixins.py
|
|
38
64
|
pfx/pfxcore/models/not_null_fields.py
|
|
@@ -52,6 +78,24 @@ pfx/pfxcore/views/fields.py
|
|
|
52
78
|
pfx/pfxcore/views/filters_views.py
|
|
53
79
|
pfx/pfxcore/views/locale_views.py
|
|
54
80
|
pfx/pfxcore/views/rest_views.py
|
|
81
|
+
pfx/pfxcore/views/parameters/__init__.py
|
|
82
|
+
pfx/pfxcore/views/parameters/date_format.py
|
|
83
|
+
pfx/pfxcore/views/parameters/groups.py
|
|
84
|
+
pfx/pfxcore/views/parameters/list_count.py
|
|
85
|
+
pfx/pfxcore/views/parameters/list_items.py
|
|
86
|
+
pfx/pfxcore/views/parameters/list_mode.py
|
|
87
|
+
pfx/pfxcore/views/parameters/list_order.py
|
|
88
|
+
pfx/pfxcore/views/parameters/list_search.py
|
|
89
|
+
pfx/pfxcore/views/parameters/media_redirect.py
|
|
90
|
+
pfx/pfxcore/views/parameters/meta_fields.py
|
|
91
|
+
pfx/pfxcore/views/parameters/meta_filters.py
|
|
92
|
+
pfx/pfxcore/views/parameters/meta_orders.py
|
|
93
|
+
pfx/pfxcore/views/parameters/subset.py
|
|
94
|
+
pfx/pfxcore/views/parameters/subset_limit.py
|
|
95
|
+
pfx/pfxcore/views/parameters/subset_offset.py
|
|
96
|
+
pfx/pfxcore/views/parameters/subset_page.py
|
|
97
|
+
pfx/pfxcore/views/parameters/subset_page_size.py
|
|
98
|
+
pfx/pfxcore/views/parameters/subset_page_subset.py
|
|
55
99
|
tests/__init__.py
|
|
56
100
|
tests/models.py
|
|
57
101
|
tests/urls.py
|
|
@@ -65,15 +109,19 @@ tests/settings/dev_default.py
|
|
|
65
109
|
tests/tests/__init__.py
|
|
66
110
|
tests/tests/basic_api_errors.py
|
|
67
111
|
tests/tests/basic_api_test.py
|
|
112
|
+
tests/tests/test_api_doc.py
|
|
68
113
|
tests/tests/test_auth_api.py
|
|
69
114
|
tests/tests/test_cache.py
|
|
115
|
+
tests/tests/test_client.py
|
|
70
116
|
tests/tests/test_fields.py
|
|
71
117
|
tests/tests/test_filters.py
|
|
72
118
|
tests/tests/test_locale_api.py
|
|
73
119
|
tests/tests/test_perm_tests.py
|
|
74
120
|
tests/tests/test_perms_api.py
|
|
121
|
+
tests/tests/test_profiling_middleware.py
|
|
75
122
|
tests/tests/test_shortcuts.py
|
|
76
123
|
tests/tests/test_timezone_middleware.py
|
|
77
124
|
tests/tests/test_tools.py
|
|
78
125
|
tests/tests/test_user_queryset.py
|
|
126
|
+
tests/tests/test_view_decorators.py
|
|
79
127
|
tests/tests/test_view_fields.py
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
import django
|
|
17
|
+
from django.conf import settings
|
|
18
|
+
|
|
19
|
+
from sphinx.ext.autodoc import between
|
|
20
|
+
|
|
21
|
+
sys.path.insert(0, os.path.abspath('../'))
|
|
22
|
+
settings.configure(
|
|
23
|
+
SECRET_KEY='something to make Django happy',
|
|
24
|
+
INSTALLED_APPS=[
|
|
25
|
+
'django.contrib.auth',
|
|
26
|
+
'django.contrib.contenttypes',
|
|
27
|
+
'django.contrib.postgres',
|
|
28
|
+
'pfx.pfxcore'])
|
|
29
|
+
django.setup()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def setup(app):
|
|
33
|
+
# Register a sphinx.ext.autodoc.between listener to ignore everything
|
|
34
|
+
# between lines that contain --- and """ (yaml from apispec)
|
|
35
|
+
app.connect('autodoc-process-docstring',
|
|
36
|
+
between('^.*(---|""")$', exclude=True))
|
|
37
|
+
return app
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# -- Project information -----------------------------------------------------
|
|
41
|
+
project = 'Django PFX'
|
|
42
|
+
copyright = '2021, Hervé Martinet, Nicolas Béraneck'
|
|
43
|
+
author = 'Hervé Martinet, Nicolas Béraneck'
|
|
44
|
+
|
|
45
|
+
# The full version, including alpha/beta/rc tags
|
|
46
|
+
release = '1.0'
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# -- General configuration ---------------------------------------------------
|
|
50
|
+
|
|
51
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
52
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
53
|
+
# ones.
|
|
54
|
+
extensions = ['myst_parser',
|
|
55
|
+
'sphinx.ext.autodoc',
|
|
56
|
+
'sphinx.ext.autosummary']
|
|
57
|
+
autodoc_member_order = 'bysource'
|
|
58
|
+
|
|
59
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
60
|
+
templates_path = ['_templates']
|
|
61
|
+
|
|
62
|
+
# List of patterns, relative to source directory, that match files and
|
|
63
|
+
# directories to ignore when looking for source files.
|
|
64
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
65
|
+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
66
|
+
|
|
67
|
+
master_doc = 'index'
|
|
68
|
+
|
|
69
|
+
# -- Options for HTML output -------------------------------------------------
|
|
70
|
+
|
|
71
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
72
|
+
# a list of builtin themes.
|
|
73
|
+
#
|
|
74
|
+
html_theme = "sphinx_rtd_theme"
|
|
75
|
+
|
|
76
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
77
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
78
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
79
|
+
# html_static_path = ['_static']
|
|
80
|
+
|
|
81
|
+
myst_heading_anchors = 3
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.. Django PFX documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Fri Dec 10 14:58:11 2021.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
|
|
6
|
+
Welcome to Django PFX's documentation!
|
|
7
|
+
======================================
|
|
8
|
+
|
|
9
|
+
.. include:: ../README.md
|
|
10
|
+
:parser: myst_parser.sphinx_
|
|
11
|
+
|
|
12
|
+
Topics
|
|
13
|
+
======
|
|
14
|
+
|
|
15
|
+
.. toctree::
|
|
16
|
+
:maxdepth: 2
|
|
17
|
+
|
|
18
|
+
source/getting_started
|
|
19
|
+
source/decorator
|
|
20
|
+
source/pfx_views
|
|
21
|
+
source/model
|
|
22
|
+
source/internationalisation
|
|
23
|
+
source/authentication
|
|
24
|
+
source/settings
|
|
25
|
+
source/testing
|
|
26
|
+
source/profiling
|
|
27
|
+
source/generate_openapi
|
|
28
|
+
source/api.views
|
|
29
|
+
|
|
30
|
+
Indices and tables
|
|
31
|
+
==================
|
|
32
|
+
|
|
33
|
+
* :ref:`genindex`
|
|
34
|
+
* :ref:`modindex`
|
|
35
|
+
* :ref:`search`
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
API Reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
``pfx.pfxcore.middleware``
|
|
5
|
+
**************************
|
|
6
|
+
|
|
7
|
+
.. autoclass:: pfx.pfxcore.middleware.AuthenticationMiddleware
|
|
8
|
+
:show-inheritance:
|
|
9
|
+
|
|
10
|
+
.. autoclass:: pfx.pfxcore.middleware.LocaleMiddleware
|
|
11
|
+
:show-inheritance:
|
|
12
|
+
|
|
13
|
+
.. autofunction:: pfx.pfxcore.middleware.locale.get_language_from_request
|
|
14
|
+
.. autofunction:: pfx.pfxcore.middleware.locale.get_timezone_from_request
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
``pfx.pfxcore.models``
|
|
18
|
+
**********************
|
|
19
|
+
|
|
20
|
+
.. autoclass:: pfx.pfxcore.models.ErrorMessageMixin
|
|
21
|
+
:members:
|
|
22
|
+
:undoc-members:
|
|
23
|
+
:show-inheritance:
|
|
24
|
+
|
|
25
|
+
.. autoclass:: pfx.pfxcore.models.JSONReprMixin
|
|
26
|
+
:members:
|
|
27
|
+
:undoc-members:
|
|
28
|
+
:show-inheritance:
|
|
29
|
+
|
|
30
|
+
.. autoclass:: pfx.pfxcore.models.PFXModelMixin
|
|
31
|
+
:members:
|
|
32
|
+
:undoc-members:
|
|
33
|
+
:show-inheritance:
|
|
34
|
+
|
|
35
|
+
``pfx.pfxcore.views``
|
|
36
|
+
*********************
|
|
37
|
+
|
|
38
|
+
Base services
|
|
39
|
+
-------------
|
|
40
|
+
|
|
41
|
+
.. autoclass:: pfx.pfxcore.views.AuthenticationView
|
|
42
|
+
:members:
|
|
43
|
+
:undoc-members:
|
|
44
|
+
:show-inheritance:
|
|
45
|
+
|
|
46
|
+
.. autoclass:: pfx.pfxcore.views.ForgottenPasswordView
|
|
47
|
+
:members:
|
|
48
|
+
:undoc-members:
|
|
49
|
+
:show-inheritance:
|
|
50
|
+
|
|
51
|
+
.. autoclass:: pfx.pfxcore.views.SignupView
|
|
52
|
+
:members:
|
|
53
|
+
:undoc-members:
|
|
54
|
+
:show-inheritance:
|
|
55
|
+
|
|
56
|
+
.. autoclass:: pfx.pfxcore.views.LocaleRestView
|
|
57
|
+
:members:
|
|
58
|
+
:undoc-members:
|
|
59
|
+
:show-inheritance:
|
|
60
|
+
|
|
61
|
+
View Mixins
|
|
62
|
+
-----------
|
|
63
|
+
|
|
64
|
+
.. autoclass:: pfx.pfxcore.views.ModelMixin
|
|
65
|
+
:members:
|
|
66
|
+
:undoc-members:
|
|
67
|
+
:show-inheritance:
|
|
68
|
+
|
|
69
|
+
.. autoclass:: pfx.pfxcore.views.ModelResponseMixin
|
|
70
|
+
:members:
|
|
71
|
+
:undoc-members:
|
|
72
|
+
:show-inheritance:
|
|
73
|
+
|
|
74
|
+
.. autoclass:: pfx.pfxcore.views.BodyMixin
|
|
75
|
+
:members:
|
|
76
|
+
:undoc-members:
|
|
77
|
+
:show-inheritance:
|
|
78
|
+
|
|
79
|
+
.. autoclass:: pfx.pfxcore.views.ModelBodyMixin
|
|
80
|
+
:members:
|
|
81
|
+
:undoc-members:
|
|
82
|
+
:show-inheritance:
|
|
83
|
+
|
|
84
|
+
.. autoclass:: pfx.pfxcore.views.DetailRestViewMixin
|
|
85
|
+
:members:
|
|
86
|
+
:undoc-members:
|
|
87
|
+
:show-inheritance:
|
|
88
|
+
|
|
89
|
+
.. autoclass:: pfx.pfxcore.views.SlugDetailRestViewMixin
|
|
90
|
+
:members:
|
|
91
|
+
:undoc-members:
|
|
92
|
+
:show-inheritance:
|
|
93
|
+
|
|
94
|
+
.. autoclass:: pfx.pfxcore.views.ListRestViewMixin
|
|
95
|
+
:members:
|
|
96
|
+
:undoc-members:
|
|
97
|
+
:show-inheritance:
|
|
98
|
+
|
|
99
|
+
.. autoclass:: pfx.pfxcore.views.CreateRestViewMixin
|
|
100
|
+
:members:
|
|
101
|
+
:undoc-members:
|
|
102
|
+
:show-inheritance:
|
|
103
|
+
|
|
104
|
+
.. autoclass:: pfx.pfxcore.views.UpdateRestViewMixin
|
|
105
|
+
:members:
|
|
106
|
+
:undoc-members:
|
|
107
|
+
:show-inheritance:
|
|
108
|
+
|
|
109
|
+
.. autoclass:: pfx.pfxcore.views.DeleteRestViewMixin
|
|
110
|
+
:members:
|
|
111
|
+
:undoc-members:
|
|
112
|
+
:show-inheritance:
|
|
113
|
+
|
|
114
|
+
.. autoclass:: pfx.pfxcore.views.MediaRestViewMixin
|
|
115
|
+
:members:
|
|
116
|
+
:undoc-members:
|
|
117
|
+
:show-inheritance:
|
|
118
|
+
|
|
119
|
+
.. autoclass:: pfx.pfxcore.views.SecuredRestViewMixin
|
|
120
|
+
:members:
|
|
121
|
+
:undoc-members:
|
|
122
|
+
:show-inheritance:
|
|
123
|
+
|
|
124
|
+
.. autoclass:: pfx.pfxcore.views.BaseRestView
|
|
125
|
+
:members:
|
|
126
|
+
:undoc-members:
|
|
127
|
+
:show-inheritance:
|
|
128
|
+
|
|
129
|
+
.. autoclass:: pfx.pfxcore.views.RestView
|
|
130
|
+
:members:
|
|
131
|
+
:undoc-members:
|
|
132
|
+
:show-inheritance:
|
|
133
|
+
|
|
134
|
+
.. autoclass:: pfx.pfxcore.views.SendMessageTokenMixin
|
|
135
|
+
:members:
|
|
136
|
+
:undoc-members:
|
|
137
|
+
:show-inheritance:
|