django-resonant-settings 0.28__tar.gz → 0.30__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_resonant_settings-0.28 → django_resonant_settings-0.30}/PKG-INFO +3 -3
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/pyproject.toml +7 -2
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth.py +2 -2
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/createsuperuser.py +6 -2
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/management/commands/createsuperuser.py +5 -1
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/celery.py +0 -3
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/rest_framework.py +2 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/.gitignore +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/LICENSE +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/README.md +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/__init__.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/_env.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/__init__.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/adapter.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/apps.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/receiver.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth_support/utils.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/development/__init__.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/development/celery.py +0 -0
- {django_resonant_settings-0.28/resonant_settings → django_resonant_settings-0.30/resonant_settings/development}/debug_toolbar.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/django.py +0 -0
- /django_resonant_settings-0.28/resonant_settings/development/extensions.py → /django_resonant_settings-0.30/resonant_settings/django_extensions.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/logging.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/oauth_toolkit.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/production/__init__.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/production/email.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/production/https.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/production/s3_storage.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/py.typed +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/testing/__init__.py +0 -0
- {django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/testing/minio_storage.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-resonant-settings
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30
|
|
4
4
|
Summary: Shared Django settings for Resonant applications.
|
|
5
5
|
Project-URL: Repository, https://github.com/kitware-resonant/cookiecutter-resonant
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/kitware-resonant/cookiecutter-resonant/issues
|
|
7
7
|
Maintainer-email: "Kitware, Inc." <kitware@kitware.com>
|
|
8
|
-
License: Apache
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Keywords: django,resonant,setting,settings
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -13,8 +13,8 @@ Classifier: Environment :: Web Environment
|
|
|
13
13
|
Classifier: Framework :: Django
|
|
14
14
|
Classifier: Framework :: Django :: 5
|
|
15
15
|
Classifier: Framework :: Django :: 5.1
|
|
16
|
+
Classifier: Framework :: Django :: 5.2
|
|
16
17
|
Classifier: Intended Audience :: Developers
|
|
17
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -7,7 +7,8 @@ name = "django-resonant-settings"
|
|
|
7
7
|
description = "Shared Django settings for Resonant applications."
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
|
-
license =
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
11
12
|
maintainers = [{ name = "Kitware, Inc.", email = "kitware@kitware.com" }]
|
|
12
13
|
keywords = [
|
|
13
14
|
"django",
|
|
@@ -20,9 +21,9 @@ classifiers = [
|
|
|
20
21
|
"Environment :: Web Environment",
|
|
21
22
|
"Framework :: Django :: 5",
|
|
22
23
|
"Framework :: Django :: 5.1",
|
|
24
|
+
"Framework :: Django :: 5.2",
|
|
23
25
|
"Framework :: Django",
|
|
24
26
|
"Intended Audience :: Developers",
|
|
25
|
-
"License :: OSI Approved :: Apache Software License",
|
|
26
27
|
"Operating System :: OS Independent",
|
|
27
28
|
"Programming Language :: Python :: 3",
|
|
28
29
|
"Programming Language :: Python :: 3.10",
|
|
@@ -70,7 +71,11 @@ combine_as_imports = true
|
|
|
70
71
|
files = [
|
|
71
72
|
"resonant_settings",
|
|
72
73
|
]
|
|
74
|
+
check_untyped_defs = true
|
|
73
75
|
show_error_codes = true
|
|
76
|
+
warn_redundant_casts = true
|
|
77
|
+
warn_unused_configs = true
|
|
78
|
+
warn_unused_ignores = true
|
|
74
79
|
|
|
75
80
|
[[tool.mypy.overrides]]
|
|
76
81
|
module = [
|
{django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/allauth.py
RENAMED
|
@@ -28,8 +28,8 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
|
|
28
28
|
|
|
29
29
|
# Use email as the identifier for login
|
|
30
30
|
ACCOUNT_LOGIN_METHODS = {"email"}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
# Don't require a username, but make email required
|
|
32
|
+
ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*", "password2*"]
|
|
33
33
|
|
|
34
34
|
# Set the username as the email
|
|
35
35
|
ACCOUNT_ADAPTER = "resonant_settings.allauth_support.adapter.EmailAsUsernameAccountAdapter"
|
|
@@ -14,7 +14,9 @@ class Command(createsuperuser.Command):
|
|
|
14
14
|
self.UserModel = EmailAsUsernameProxyUser
|
|
15
15
|
self.username_field = self.UserModel._meta.get_field(self.UserModel.USERNAME_FIELD)
|
|
16
16
|
|
|
17
|
-
def _validate_username(
|
|
17
|
+
def _validate_username(
|
|
18
|
+
self, username: str, verbose_field_name: str, database: str
|
|
19
|
+
) -> str | None:
|
|
18
20
|
# Since "username" is actually unique, "email" (i.e. "self.username_field") is logically
|
|
19
21
|
# unique too. Explicitly setting the "_unique" attribute ensures that app-level duplicate
|
|
20
22
|
# checking is done by "_validate_username", which produces better, earlier error messages.
|
|
@@ -23,7 +25,9 @@ class Command(createsuperuser.Command):
|
|
|
23
25
|
with temporarily_change_attributes(self.username_field, _unique=True):
|
|
24
26
|
# Normalize (as it would be done before saving) for better duplicate detection
|
|
25
27
|
username = self.UserModel.normalize_username(username)
|
|
26
|
-
return super()._validate_username(
|
|
28
|
+
return super()._validate_username( # type: ignore[misc]
|
|
29
|
+
username, verbose_field_name, database
|
|
30
|
+
)
|
|
27
31
|
|
|
28
32
|
|
|
29
33
|
class EmailAsUsernameProxyUserManager(UserManager):
|
|
@@ -15,8 +15,12 @@ When Allauth is configured to use a User's `email` as the `username`, override t
|
|
|
15
15
|
management command to only prompt for an email address.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
+
username_required: bool | None = allauth_settings.SIGNUP_FIELDS.get("username", {}).get(
|
|
19
|
+
"required", None
|
|
20
|
+
)
|
|
21
|
+
|
|
18
22
|
# If using email as username
|
|
19
|
-
if not
|
|
23
|
+
if not username_required:
|
|
20
24
|
# Expose the modified command
|
|
21
25
|
Command: type[BaseCommand] = allauth_support_createsuperuser.Command
|
|
22
26
|
user_model: type[AbstractUser] = allauth_support_createsuperuser.EmailAsUsernameProxyUser
|
|
@@ -45,9 +45,6 @@ CELERY_TASK_ACKS_ON_FAILURE_OR_TIMEOUT = True
|
|
|
45
45
|
# and this will be Celery's default in 6.0.
|
|
46
46
|
CELERY_WORKER_CANCEL_LONG_RUNNING_TASKS_ON_CONNECTION_LOSS = True
|
|
47
47
|
|
|
48
|
-
# This is the default, but is necessary to suppress warnings in Celery
|
|
49
|
-
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True
|
|
50
|
-
|
|
51
48
|
# CloudAMQP-suggested settings
|
|
52
49
|
# https://www.cloudamqp.com/docs/celery.html
|
|
53
50
|
CELERY_BROKER_POOL_LIMIT = 1
|
{django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/rest_framework.py
RENAMED
|
@@ -70,6 +70,8 @@ SWAGGER_SETTINGS: dict[str, Any] = {
|
|
|
70
70
|
# security definition for.
|
|
71
71
|
"SECURITY_DEFINITIONS": None,
|
|
72
72
|
"USE_SESSION_AUTH": True,
|
|
73
|
+
# Needed because https://github.com/axnsan12/drf-yasg/pull/911
|
|
74
|
+
"USE_COMPAT_RENDERERS": False,
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
REDOC_SETTINGS: dict[str, Any] = {}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/__init__.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
|
{django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/logging.py
RENAMED
|
File without changes
|
{django_resonant_settings-0.28 → django_resonant_settings-0.30}/resonant_settings/oauth_toolkit.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
|