django-pfx 1.4.dev62__tar.gz → 1.4.dev66__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.dev62 → django_pfx-1.4.dev66}/.gitignore +1 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/PKG-INFO +1 -1
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/django_pfx.egg-info/PKG-INFO +1 -1
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/django_pfx.egg-info/SOURCES.txt +2 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/authentication.md +27 -3
- django_pfx-1.4.dev66/pfx/pfxcore/migrations/0002_pfxpermissionsuser.py +45 -0
- django_pfx-1.4.dev66/pfx/pfxcore/migrations/0003_delete_pfxpermissionsuser.py +16 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/__init__.py +1 -1
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/abstract_pfx_base_user.py +11 -2
- django_pfx-1.4.dev66/pfx/pfxcore/models/pfx_user.py +11 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/models.py +1 -1
- django_pfx-1.4.dev62/pfx/pfxcore/models/pfx_user.py +0 -11
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/.gitlab-ci.yml +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/.pre-commit-config.yaml +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/LICENSE +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/MANIFEST.in +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/README.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/django_pfx.egg-info/dependency_links.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/django_pfx.egg-info/requires.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/django_pfx.egg-info/top_level.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/Makefile +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/conf.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/index.rst +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/api.views.rst +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/decorator.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/generate_openapi.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/getting_started.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/internationalisation.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/model.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/pfx_views.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/profiling.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/settings.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/doc/source/testing.md +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/img/pfx.png +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/img/pfx.svg +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/make_messages +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/manage.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/apidoc/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/apidoc/parameters.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/apidoc/schema.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/apidoc/tags.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/apps.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/decorator/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/decorator/rest.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/default_settings.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/exceptions.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/http/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/http/json_response.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/management/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/management/commands/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/management/commands/makeapidoc.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/management/commands/profile.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/middleware/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/middleware/authentication.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/middleware/locale.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/middleware/profiling.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/migrations/0001_initial.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/migrations/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/cache_mixins.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/login_ban.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/not_null_fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/otp_user_mixin.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/pfx_models.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/models/user_filtered_queryset_mixin.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/serializers/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/serializers/json.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/settings.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/shortcuts.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/storage/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/storage/s3_storage.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/otp_code_email.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/otp_code_subject.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/password_reset_email.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/password_reset_subject.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/welcome_email.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/welcome_subject.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/test.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/urls.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/authentication_views.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/filters_views.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/locale_views.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/date_format.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/groups.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/list_count.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/list_items.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/list_mode.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/list_order.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/list_search.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/media_redirect.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/meta_fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/meta_filters.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/meta_orders.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_limit.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_offset.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_page.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_page_size.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_page_subset.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/rest_views.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/settings/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pfx/settings/dev.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/pyproject.toml +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/requirements.txt +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/serve-doc +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/setup.cfg +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/setup.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/ci.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/common.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/dev.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/dev_custom_example.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/settings/dev_default.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/__init__.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/basic_api_errors.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/basic_api_test.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_api_doc.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_api_doc_search.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_auth_api.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_body_mixin.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_cache.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_client.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_filters.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_locale_api.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_perm_tests.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_perms_api.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_profiling_middleware.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_settings.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_shortcuts.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_timezone_middleware.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_tools.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_user_queryset.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_view_decorators.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/tests/test_view_fields.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/urls.py +0 -0
- {django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/tests/views.py +0 -0
|
@@ -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
|
|
@@ -9,20 +9,44 @@ including password validation and hashing.
|
|
|
9
9
|
## User Model
|
|
10
10
|
|
|
11
11
|
You have the option to use the standard Django User with {class}`pfx.pfxcore.models.PFXUser`
|
|
12
|
-
(which is a {class}`django.contrib.auth.models.User` with PFX required mixins)
|
|
13
|
-
|
|
12
|
+
(which is a {class}`django.contrib.auth.models.User` with PFX required mixins):
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
AUTH_USER_MODEL = 'pfxcore.PFXUser'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
But you may prefer to use your own model. To do this, create your own user class.
|
|
19
|
+
|
|
20
|
+
You have 2 options:
|
|
14
21
|
|
|
15
22
|
```python
|
|
16
23
|
from pfx.pfxcore.models import AbstractPFXBaseUser
|
|
17
24
|
|
|
18
25
|
class MyUser(AbstractPFXBaseUser):
|
|
26
|
+
# Equivalent of django.contrib.auth.models.AbstractBaseUser for PFX.
|
|
27
|
+
#
|
|
28
|
+
# Minimal user, you have to manage the USERNAME_FIELD by yourself,
|
|
29
|
+
# and you have to add django.contrib.auth.models.PermissionsMixin
|
|
30
|
+
# if you want to use the permission system.
|
|
19
31
|
pass
|
|
20
32
|
```
|
|
21
33
|
|
|
34
|
+
```python
|
|
35
|
+
from pfx.pfxcore.models import AbstractPFXUser
|
|
36
|
+
|
|
37
|
+
class MyUser(AbstractPFXUser):
|
|
38
|
+
# Equivalent of django.contrib.auth.models.AbstractUser for PFX.
|
|
39
|
+
#
|
|
40
|
+
# This is the same as using pfxcore.PFXUser, but you can add your
|
|
41
|
+
# custom fields.
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
22
46
|
Then, define the model in your settings:
|
|
23
47
|
|
|
24
48
|
```python
|
|
25
|
-
AUTH_USER_MODEL =
|
|
49
|
+
AUTH_USER_MODEL = 'myapp.MyUser'
|
|
26
50
|
```
|
|
27
51
|
|
|
28
52
|
## Authentication Modes
|
|
@@ -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,7 +1,9 @@
|
|
|
1
|
-
from django.contrib.auth.models import AbstractBaseUser
|
|
1
|
+
from django.contrib.auth.models import AbstractBaseUser, AbstractUser
|
|
2
2
|
|
|
3
|
+
from .pfx_models import PFXModelMixin
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
class AbstractPFXBaseUser(PFXModelMixin, AbstractBaseUser):
|
|
5
7
|
"""The base abstract user for PFX."""
|
|
6
8
|
|
|
7
9
|
class Meta:
|
|
@@ -16,3 +18,10 @@ class AbstractPFXBaseUser(AbstractBaseUser):
|
|
|
16
18
|
changes, the previously issued tokens will no longer be valid.
|
|
17
19
|
"""
|
|
18
20
|
return self.password
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AbstractPFXUser(AbstractUser, AbstractPFXBaseUser):
|
|
24
|
+
"""The base abstract user for PFX with permissions mixin."""
|
|
25
|
+
|
|
26
|
+
class Meta:
|
|
27
|
+
abstract = True
|
|
@@ -50,7 +50,7 @@ class UserManager(BaseUserManager):
|
|
|
50
50
|
is_superuser=True)
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
class User(CacheableMixin,
|
|
53
|
+
class User(CacheableMixin, OtpUserMixin, AbstractPFXBaseUser):
|
|
54
54
|
username = models.CharField(
|
|
55
55
|
'username',
|
|
56
56
|
max_length=150,
|
|
@@ -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
|
{django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/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.dev62 → django_pfx-1.4.dev66}/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.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/templates/registration/welcome_email.txt
RENAMED
|
File without changes
|
{django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/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
|
|
File without changes
|
{django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/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.dev62 → django_pfx-1.4.dev66}/pfx/pfxcore/views/parameters/subset_page_size.py
RENAMED
|
File without changes
|
{django_pfx-1.4.dev62 → django_pfx-1.4.dev66}/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
|