django-pfx 1.4.dev60__tar.gz → 1.4.dev64__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.dev60 → django_pfx-1.4.dev64}/.gitignore +1 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/PKG-INFO +2 -2
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/django_pfx.egg-info/PKG-INFO +2 -2
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/django_pfx.egg-info/SOURCES.txt +2 -0
- django_pfx-1.4.dev64/pfx/pfxcore/migrations/0002_pfxpermissionsuser.py +45 -0
- django_pfx-1.4.dev64/pfx/pfxcore/migrations/0003_delete_pfxpermissionsuser.py +16 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/__init__.py +1 -1
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/abstract_pfx_base_user.py +8 -1
- django_pfx-1.4.dev64/pfx/pfxcore/models/pfx_user.py +12 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/fields.py +6 -1
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/basic_api_test.py +3 -0
- django_pfx-1.4.dev60/pfx/pfxcore/models/pfx_user.py +0 -11
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/.gitlab-ci.yml +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/.pre-commit-config.yaml +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/LICENSE +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/MANIFEST.in +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/README.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/django_pfx.egg-info/dependency_links.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/django_pfx.egg-info/requires.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/django_pfx.egg-info/top_level.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/Makefile +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/conf.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/index.rst +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/api.views.rst +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/authentication.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/decorator.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/generate_openapi.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/getting_started.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/internationalisation.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/model.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/pfx_views.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/profiling.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/settings.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/doc/source/testing.md +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/img/pfx.png +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/img/pfx.svg +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/make_messages +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/manage.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/apidoc/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/apidoc/parameters.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/apidoc/schema.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/apidoc/tags.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/apps.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/decorator/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/decorator/rest.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/default_settings.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/exceptions.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/fields.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/http/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/http/json_response.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/management/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/management/commands/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/management/commands/makeapidoc.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/management/commands/profile.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/middleware/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/middleware/authentication.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/middleware/locale.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/middleware/profiling.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/cache_mixins.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/login_ban.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/not_null_fields.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/otp_user_mixin.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/pfx_models.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/models/user_filtered_queryset_mixin.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/serializers/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/serializers/json.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/settings.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/shortcuts.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/storage/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/storage/s3_storage.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/otp_code_email.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/otp_code_subject.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/password_reset_email.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/password_reset_subject.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/welcome_email.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/welcome_subject.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/test.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/urls.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/authentication_views.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/filters_views.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/locale_views.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/date_format.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/groups.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/list_count.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/list_items.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/list_mode.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/list_order.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/list_search.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/media_redirect.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/meta_fields.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/meta_filters.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/meta_orders.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_limit.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_offset.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_page.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_page_size.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_page_subset.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/rest_views.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/settings/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/settings/dev.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pyproject.toml +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/requirements.txt +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/serve-doc +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/setup.cfg +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/setup.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/models.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/ci.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/common.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/dev.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/dev_custom_example.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/settings/dev_default.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/__init__.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/basic_api_errors.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_api_doc.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_api_doc_search.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_auth_api.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_body_mixin.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_cache.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_client.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_fields.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_filters.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_locale_api.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_perm_tests.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_perms_api.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_profiling_middleware.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_settings.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_shortcuts.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_timezone_middleware.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_tools.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_user_queryset.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_view_decorators.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/tests/test_view_fields.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/urls.py +0 -0
- {django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/tests/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: django-pfx
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.dev64
|
|
4
4
|
Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
|
|
5
5
|
Author: Hervé Martinet
|
|
6
6
|
Author-email: herve.martinet@gmail.com
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: django-pfx
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.dev64
|
|
4
4
|
Summary: Django PFX is a toolkit designed to streamline the development of RESTful APIs using the Django framework.
|
|
5
5
|
Author: Hervé Martinet
|
|
6
6
|
Author-email: herve.martinet@gmail.com
|
|
@@ -61,6 +61,8 @@ pfx/pfxcore/middleware/authentication.py
|
|
|
61
61
|
pfx/pfxcore/middleware/locale.py
|
|
62
62
|
pfx/pfxcore/middleware/profiling.py
|
|
63
63
|
pfx/pfxcore/migrations/0001_initial.py
|
|
64
|
+
pfx/pfxcore/migrations/0002_pfxpermissionsuser.py
|
|
65
|
+
pfx/pfxcore/migrations/0003_delete_pfxpermissionsuser.py
|
|
64
66
|
pfx/pfxcore/migrations/__init__.py
|
|
65
67
|
pfx/pfxcore/models/__init__.py
|
|
66
68
|
pfx/pfxcore/models/abstract_pfx_base_user.py
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Generated by Django 4.2.17 on 2025-01-20 06:47
|
|
2
|
+
# flake8: noqa
|
|
3
|
+
|
|
4
|
+
import django.contrib.auth.models
|
|
5
|
+
import django.contrib.auth.validators
|
|
6
|
+
import django.utils.timezone
|
|
7
|
+
from django.db import migrations, models
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Migration(migrations.Migration):
|
|
11
|
+
|
|
12
|
+
dependencies = [
|
|
13
|
+
('auth', '0012_alter_user_first_name_max_length'),
|
|
14
|
+
('pfxcore', '0001_initial'),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
operations = [
|
|
18
|
+
migrations.CreateModel(
|
|
19
|
+
name='PFXPermissionsUser',
|
|
20
|
+
fields=[
|
|
21
|
+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
22
|
+
('password', models.CharField(max_length=128, verbose_name='password')),
|
|
23
|
+
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
|
24
|
+
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
|
25
|
+
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
|
|
26
|
+
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
|
|
27
|
+
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
|
|
28
|
+
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
|
|
29
|
+
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
|
30
|
+
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
|
31
|
+
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
|
32
|
+
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
|
|
33
|
+
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
|
|
34
|
+
],
|
|
35
|
+
options={
|
|
36
|
+
'verbose_name': 'user',
|
|
37
|
+
'verbose_name_plural': 'users',
|
|
38
|
+
'abstract': False,
|
|
39
|
+
'swappable': 'AUTH_USER_MODEL',
|
|
40
|
+
},
|
|
41
|
+
managers=[
|
|
42
|
+
('objects', django.contrib.auth.models.UserManager()),
|
|
43
|
+
],
|
|
44
|
+
),
|
|
45
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Generated by Django 4.2.18 on 2025-01-20 13:24
|
|
2
|
+
|
|
3
|
+
from django.db import migrations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
('pfxcore', '0002_pfxpermissionsuser'),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.DeleteModel(
|
|
14
|
+
name='PFXPermissionsUser',
|
|
15
|
+
),
|
|
16
|
+
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from django.contrib.auth.models import AbstractBaseUser
|
|
1
|
+
from django.contrib.auth.models import AbstractBaseUser, AbstractUser
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class AbstractPFXBaseUser(AbstractBaseUser):
|
|
@@ -16,3 +16,10 @@ class AbstractPFXBaseUser(AbstractBaseUser):
|
|
|
16
16
|
changes, the previously issued tokens will no longer be valid.
|
|
17
17
|
"""
|
|
18
18
|
return self.password
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AbstractPFXUser(AbstractUser, AbstractPFXBaseUser):
|
|
22
|
+
"""The base abstract user for PFX with permissions mixin."""
|
|
23
|
+
|
|
24
|
+
class Meta:
|
|
25
|
+
abstract = True
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from django.contrib.auth.models import AbstractUser
|
|
2
|
+
|
|
3
|
+
from .abstract_pfx_base_user import AbstractPFXUser
|
|
4
|
+
from .pfx_models import PFXModelMixin
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class PFXUser(PFXModelMixin, AbstractPFXUser):
|
|
8
|
+
"""The Django User with PFX mixins.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
class Meta(AbstractUser.Meta):
|
|
12
|
+
swappable = "AUTH_USER_MODEL"
|
|
@@ -91,7 +91,8 @@ class ViewField:
|
|
|
91
91
|
def __init__(
|
|
92
92
|
self, name, verbose_name=None, alias=None, field_type=None,
|
|
93
93
|
readonly=False, readonly_create=False, readonly_update=False,
|
|
94
|
-
choices=None, json_repr=None,
|
|
94
|
+
choices=None, json_repr=None,
|
|
95
|
+
related_model=None, related_model_api=None,
|
|
95
96
|
select_related=None, prefetch_related=None):
|
|
96
97
|
self.name = name
|
|
97
98
|
self.alias = alias or name
|
|
@@ -102,6 +103,7 @@ class ViewField:
|
|
|
102
103
|
self.choices = dict(choices or [])
|
|
103
104
|
self.json_repr = json_repr
|
|
104
105
|
self.related_model = related_model
|
|
106
|
+
self.related_model_api = related_model_api
|
|
105
107
|
self.select_related = select_related or []
|
|
106
108
|
self.prefetch_related = prefetch_related or []
|
|
107
109
|
|
|
@@ -113,6 +115,9 @@ class ViewField:
|
|
|
113
115
|
if self.choices:
|
|
114
116
|
res['choices'] = [
|
|
115
117
|
dict(label=_(v), value=k) for k, v in self.choices.items()]
|
|
118
|
+
if self.related_model:
|
|
119
|
+
res['model'] = self.related_model._meta.label
|
|
120
|
+
res['api'] = self.related_model_api or self.related_model.api
|
|
116
121
|
res['readonly'] = dict(
|
|
117
122
|
post=self.readonly_create,
|
|
118
123
|
put=self.readonly_update)
|
|
@@ -584,6 +584,9 @@ class BasicAPITest(TestAssertMixin, TestCase):
|
|
|
584
584
|
self.assertJE(response, 'fields.types.type', 'ModelObjectList')
|
|
585
585
|
self.assertJE(response, 'fields.types.name', 'Types')
|
|
586
586
|
response = self.client.get('/api/books/meta')
|
|
587
|
+
self.assertJE(response, 'fields.author.type', 'ModelObject')
|
|
588
|
+
self.assertJE(response, 'fields.author.model', 'tests.Author')
|
|
589
|
+
self.assertJE(response, 'fields.author.api', '/authors')
|
|
587
590
|
self.assertJE(
|
|
588
591
|
response, 'fields.read_time.type', 'MinutesDurationField')
|
|
589
592
|
self.assertJE(response, 'fields.read_time.name', 'Read Time')
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from django.contrib.auth.models import AbstractUser
|
|
2
|
-
|
|
3
|
-
from .abstract_pfx_base_user import AbstractPFXBaseUser
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class PFXUser(AbstractUser, AbstractPFXBaseUser):
|
|
7
|
-
"""The Django User with PFX mixin.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
class Meta(AbstractUser.Meta):
|
|
11
|
-
swappable = "AUTH_USER_MODEL"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/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.dev60 → django_pfx-1.4.dev64}/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.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/welcome_email.txt
RENAMED
|
File without changes
|
{django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/templates/registration/welcome_subject.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
|
{django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/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
|
|
File without changes
|
|
File without changes
|
{django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/pfx/pfxcore/views/parameters/subset_page_size.py
RENAMED
|
File without changes
|
{django_pfx-1.4.dev60 → django_pfx-1.4.dev64}/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
|