django-resonant-settings 0.40.0__tar.gz → 0.42.0__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.
Files changed (31) hide show
  1. django_resonant_settings-0.42.0/NOTICE +13 -0
  2. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/PKG-INFO +3 -1
  3. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/pyproject.toml +2 -1
  4. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth.py +15 -0
  5. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/createsuperuser.py +8 -2
  6. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/celery.py +15 -0
  7. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/development/celery.py +7 -0
  8. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/development/debug_toolbar.py +7 -1
  9. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/development/minio_storage.py +12 -0
  10. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/django.py +6 -0
  11. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/django_extensions.py +6 -0
  12. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/logging.py +4 -0
  13. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/oauth_toolkit.py +6 -1
  14. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/production/email.py +5 -0
  15. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/production/https.py +9 -4
  16. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/production/s3_storage.py +12 -1
  17. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/rest_framework.py +9 -1
  18. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/.gitignore +0 -0
  19. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/LICENSE +0 -0
  20. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/README.md +0 -0
  21. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/__init__.py +0 -0
  22. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/_env.py +0 -0
  23. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/__init__.py +0 -0
  24. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/adapter.py +0 -0
  25. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/apps.py +0 -0
  26. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/management/commands/createsuperuser.py +0 -0
  27. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/receiver.py +0 -0
  28. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/allauth_support/utils.py +0 -0
  29. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/development/__init__.py +0 -0
  30. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/production/__init__.py +0 -0
  31. {django_resonant_settings-0.40.0 → django_resonant_settings-0.42.0}/resonant_settings/py.typed +0 -0
@@ -0,0 +1,13 @@
1
+ Copyright 2020 Kitware, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ See accompanying LICENSE file. You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-resonant-settings
3
- Version: 0.40.0
3
+ Version: 0.42.0
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
8
  License-Expression: Apache-2.0
9
9
  License-File: LICENSE
10
+ License-File: NOTICE
10
11
  Keywords: django,resonant,setting,settings
11
12
  Classifier: Development Status :: 3 - Alpha
12
13
  Classifier: Environment :: Web Environment
@@ -22,6 +23,7 @@ Classifier: Programming Language :: Python :: 3.10
22
23
  Classifier: Programming Language :: Python :: 3.11
23
24
  Classifier: Programming Language :: Python :: 3.12
24
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
25
27
  Requires-Python: >=3.10
26
28
  Requires-Dist: django-environ
27
29
  Provides-Extra: allauth
@@ -8,7 +8,7 @@ description = "Shared Django settings for Resonant applications."
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.10"
10
10
  license = "Apache-2.0"
11
- license-files = ["LICENSE"]
11
+ license-files = ["LICENSE", "NOTICE"]
12
12
  maintainers = [{ name = "Kitware, Inc.", email = "kitware@kitware.com" }]
13
13
  keywords = [
14
14
  "django",
@@ -30,6 +30,7 @@ classifiers = [
30
30
  "Programming Language :: Python :: 3.11",
31
31
  "Programming Language :: Python :: 3.12",
32
32
  "Programming Language :: Python :: 3.13",
33
+ "Programming Language :: Python :: 3.14",
33
34
  "Programming Language :: Python",
34
35
  ]
35
36
  dependencies = [
@@ -45,3 +45,18 @@ ACCOUNT_CONFIRM_EMAIL_ON_GET = True
45
45
 
46
46
  # This will likely become the default in the future, but enable it now
47
47
  ACCOUNT_PRESERVE_USERNAME_CASING = False
48
+
49
+ __all__ = [
50
+ "SITE_ID",
51
+ "AUTHENTICATION_BACKENDS",
52
+ "ACCOUNT_EMAIL_VERIFICATION",
53
+ "ACCOUNT_LOGIN_METHODS",
54
+ "ACCOUNT_SIGNUP_FIELDS",
55
+ "ACCOUNT_ADAPTER",
56
+ "ACCOUNT_USER_MODEL_USERNAME_FIELD",
57
+ "ACCOUNT_SESSION_REMEMBER",
58
+ "ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION",
59
+ "ACCOUNT_LOGIN_ON_PASSWORD_RESET",
60
+ "ACCOUNT_CONFIRM_EMAIL_ON_GET",
61
+ "ACCOUNT_PRESERVE_USERNAME_CASING",
62
+ ]
@@ -1,12 +1,18 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, ClassVar
3
+ from typing import TYPE_CHECKING, Any, ClassVar
4
4
 
5
+ from django.contrib.auth import get_user_model
5
6
  from django.contrib.auth.management.commands import createsuperuser
6
- from django.contrib.auth.models import User, UserManager
7
7
 
8
8
  from resonant_settings.allauth_support.utils import temporarily_change_attributes
9
9
 
10
+ if TYPE_CHECKING:
11
+ from django.contrib.auth.models import User, UserManager
12
+ else:
13
+ User = get_user_model()
14
+ UserManager = User._default_manager.__class__
15
+
10
16
 
11
17
  class Command(createsuperuser.Command):
12
18
  def __init__(self, *args: Any, **kwargs: Any):
@@ -69,3 +69,18 @@ CELERY_WORKER_CONCURRENCY: int | None = None
69
69
  celery.app.trace.LOG_RECEIVED = """\
70
70
  Task %(name)s[%(id)s] received: (%(args)s, %(kwargs)s)\
71
71
  """
72
+
73
+ __all__ = [
74
+ "CELERY_BROKER_URL",
75
+ "CELERY_RESULT_BACKEND",
76
+ "CELERY_TASK_ACKS_LATE",
77
+ "CELERY_TASK_REJECT_ON_WORKER_LOST",
78
+ "CELERY_TASK_ACKS_ON_FAILURE_OR_TIMEOUT",
79
+ "CELERY_WORKER_CANCEL_LONG_RUNNING_TASKS_ON_CONNECTION_LOSS",
80
+ "CELERY_BROKER_POOL_LIMIT",
81
+ "CELERY_BROKER_HEARTBEAT",
82
+ "CELERY_BROKER_CONNECTION_TIMEOUT",
83
+ "CELERY_EVENT_QUEUE_EXPIRES",
84
+ "CELERY_WORKER_PREFETCH_MULTIPLIER",
85
+ "CELERY_WORKER_CONCURRENCY",
86
+ ]
@@ -10,3 +10,10 @@ CELERY_TASK_EAGER_PROPAGATES = CELERY_TASK_ALWAYS_EAGER
10
10
 
11
11
  # In development, run without concurrency.
12
12
  CELERY_WORKER_CONCURRENCY: int | None = 1
13
+
14
+ __all__ = [
15
+ "CELERY_TASK_ACKS_LATE",
16
+ "CELERY_TASK_ALWAYS_EAGER",
17
+ "CELERY_TASK_EAGER_PROPAGATES",
18
+ "CELERY_WORKER_CONCURRENCY",
19
+ ]
@@ -5,9 +5,15 @@ Configure Django Debug Toolbar with the following features:
5
5
  This requires the `django-debug-toolbar` package to be installed.
6
6
  """
7
7
 
8
- DEBUG_TOOLBAR_CONFIG = {
8
+ from typing import Any
9
+
10
+ DEBUG_TOOLBAR_CONFIG: dict[str, Any] = {
9
11
  # The default size often is too small, causing an inability to view queries
10
12
  "RESULTS_CACHE_SIZE": 250,
11
13
  # If this setting is True, large sql queries can cause the page to render slowly
12
14
  "PRETTIFY_SQL": False,
13
15
  }
16
+
17
+ __all__ = [
18
+ "DEBUG_TOOLBAR_CONFIG",
19
+ ]
@@ -26,3 +26,15 @@ MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET = True
26
26
  MINIO_STORAGE_AUTO_CREATE_MEDIA_POLICY = "NONE"
27
27
  # Issue signed URLs to provide any read access
28
28
  MINIO_STORAGE_MEDIA_USE_PRESIGNED = True
29
+
30
+ __all__ = [
31
+ "MINIO_STORAGE_USE_HTTPS",
32
+ "MINIO_STORAGE_ENDPOINT",
33
+ "MINIO_STORAGE_ACCESS_KEY",
34
+ "MINIO_STORAGE_SECRET_KEY",
35
+ "MINIO_STORAGE_MEDIA_BUCKET_NAME",
36
+ "MINIO_STORAGE_MEDIA_URL",
37
+ "MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET",
38
+ "MINIO_STORAGE_AUTO_CREATE_MEDIA_POLICY",
39
+ "MINIO_STORAGE_MEDIA_USE_PRESIGNED",
40
+ ]
@@ -33,3 +33,9 @@ AUTH_PASSWORD_VALIDATORS = [
33
33
  {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
34
34
  {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
35
35
  ]
36
+
37
+ __all__ = [
38
+ "TEMPLATES",
39
+ "PASSWORD_HASHERS",
40
+ "AUTH_PASSWORD_VALIDATORS",
41
+ ]
@@ -7,3 +7,9 @@ This requires the `django-extensions` package to be installed.
7
7
  SHELL_PLUS_PRINT_SQL = True
8
8
  SHELL_PLUS_PRINT_SQL_TRUNCATE = None
9
9
  RUNSERVER_PLUS_PRINT_SQL_TRUNCATE = None
10
+
11
+ __all__ = [
12
+ "SHELL_PLUS_PRINT_SQL",
13
+ "SHELL_PLUS_PRINT_SQL_TRUNCATE",
14
+ "RUNSERVER_PLUS_PRINT_SQL_TRUNCATE",
15
+ ]
@@ -87,3 +87,7 @@ LOGGING = {
87
87
  },
88
88
  },
89
89
  }
90
+
91
+ __all__ = [
92
+ "LOGGING",
93
+ ]
@@ -8,8 +8,9 @@ This requires the `django-oauth-toolkit` package to be installed.
8
8
  """
9
9
 
10
10
  from datetime import timedelta
11
+ from typing import Any
11
12
 
12
- OAUTH2_PROVIDER = {
13
+ OAUTH2_PROVIDER: dict[str, Any] = {
13
14
  "ALLOWED_REDIRECT_URI_SCHEMES": ["https"],
14
15
  # Don't require users to re-approve scopes each time
15
16
  "REQUEST_APPROVAL_PROMPT": "auto",
@@ -30,3 +31,7 @@ OAUTH2_PROVIDER = {
30
31
  # every 30 days.
31
32
  "REFRESH_TOKEN_EXPIRE_SECONDS": timedelta(days=30).total_seconds(),
32
33
  }
34
+
35
+ __all__ = [
36
+ "OAUTH2_PROVIDER",
37
+ ]
@@ -14,3 +14,8 @@ vars().update(env.email_url("DJANGO_EMAIL_URL"))
14
14
 
15
15
  DEFAULT_FROM_EMAIL: str = env.str("DJANGO_DEFAULT_FROM_EMAIL")
16
16
  SERVER_EMAIL = DEFAULT_FROM_EMAIL
17
+
18
+ __all__ = [
19
+ "DEFAULT_FROM_EMAIL",
20
+ "SERVER_EMAIL",
21
+ ]
@@ -4,10 +4,6 @@ from datetime import timedelta
4
4
 
5
5
  SECURE_SSL_REDIRECT = True
6
6
 
7
- # This needs to be set by the HTTPS terminating reverse proxy.
8
- # Heroku and Render automatically set this.
9
- SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
10
-
11
7
  SESSION_COOKIE_SECURE = True
12
8
  CSRF_COOKIE_SECURE = True
13
9
 
@@ -20,3 +16,12 @@ SECURE_HSTS_INCLUDE_SUBDOMAINS = False
20
16
  # opt-in to preload by overriding this setting. Additionally, all subdomains must have HSTS to
21
17
  # register for preloading.
22
18
  SECURE_HSTS_PRELOAD = False
19
+
20
+ __all__ = [
21
+ "SECURE_SSL_REDIRECT",
22
+ "SESSION_COOKIE_SECURE",
23
+ "CSRF_COOKIE_SECURE",
24
+ "SECURE_HSTS_SECONDS",
25
+ "SECURE_HSTS_INCLUDE_SUBDOMAINS",
26
+ "SECURE_HSTS_PRELOAD",
27
+ ]
@@ -23,7 +23,7 @@ AWS_S3_SECRET_ACCESS_KEY: str = env.str("AWS_SECRET_ACCESS_KEY")
23
23
  AWS_STORAGE_BUCKET_NAME: str = env.str("DJANGO_STORAGE_BUCKET_NAME")
24
24
 
25
25
  # It's critical to use the v4 signature;
26
- # it isn't the upstream default only for backwards compatability reasons.
26
+ # it isn't the upstream default only for backwards compatibility reasons.
27
27
  AWS_S3_SIGNATURE_VERSION = "s3v4"
28
28
 
29
29
  AWS_S3_MAX_MEMORY_SIZE = 5 * 1024 * 1024
@@ -33,3 +33,14 @@ AWS_S3_MAX_MEMORY_SIZE = 5 * 1024 * 1024
33
33
  # the event of a collision, which can be confusing.
34
34
  AWS_S3_FILE_OVERWRITE = True
35
35
  AWS_QUERYSTRING_EXPIRE = int(timedelta(hours=6).total_seconds())
36
+
37
+ __all__ = [
38
+ "AWS_S3_REGION_NAME",
39
+ "AWS_S3_ACCESS_KEY_ID",
40
+ "AWS_S3_SECRET_ACCESS_KEY",
41
+ "AWS_STORAGE_BUCKET_NAME",
42
+ "AWS_S3_SIGNATURE_VERSION",
43
+ "AWS_S3_MAX_MEMORY_SIZE",
44
+ "AWS_S3_FILE_OVERWRITE",
45
+ "AWS_QUERYSTRING_EXPIRE",
46
+ ]
@@ -12,7 +12,7 @@ from typing import Any
12
12
  SESSION_COOKIE_SAMESITE = "Lax"
13
13
  CORS_ALLOW_CREDENTIALS = False
14
14
 
15
- REST_FRAMEWORK = {
15
+ REST_FRAMEWORK: dict[str, Any] = {
16
16
  "DEFAULT_AUTHENTICATION_CLASSES": [
17
17
  "oauth2_provider.contrib.rest_framework.OAuth2Authentication",
18
18
  # Allow SessionAuthentication, as this is much more convenient for Ajax requests
@@ -75,3 +75,11 @@ SWAGGER_SETTINGS: dict[str, Any] = {
75
75
  }
76
76
 
77
77
  REDOC_SETTINGS: dict[str, Any] = {}
78
+
79
+ __all__ = [
80
+ "SESSION_COOKIE_SAMESITE",
81
+ "CORS_ALLOW_CREDENTIALS",
82
+ "REST_FRAMEWORK",
83
+ "SWAGGER_SETTINGS",
84
+ "REDOC_SETTINGS",
85
+ ]