Skip to content

Commit

Permalink
5.0: Update django.conf (#2008)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope authored Mar 14, 2024
1 parent d3630bf commit 8b5596e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions django-stubs/conf/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ ENVIRONMENT_VARIABLE: Literal["DJANGO_SETTINGS_MODULE"]
DEFAULT_STORAGE_ALIAS: Literal["default"]
STATICFILES_STORAGE_ALIAS: Literal["staticfiles"]

# RemovedInDjango60Warning.
FORMS_URLFIELD_ASSUME_HTTPS_DEPRECATED_MSG: str

# required for plugin to be able to distinguish this specific instance of LazySettings from others
@type_check_only
class _DjangoConfLazyObject(LazyObject):
Expand Down
9 changes: 5 additions & 4 deletions django-stubs/conf/global_settings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ TEMPLATES: list[dict[str, Any]]
# Default form rendering class.
FORM_RENDERER: str

# RemovedInDjango60Warning: It's a transitional setting helpful in early
# adoption of "https" as the new default value of forms.URLField.assume_scheme.
# Set to True to assume "https" during the Django 5.x release cycle.
FORMS_URLFIELD_ASSUME_HTTPS: bool

# Default email address to use for various automated correspondence from
# the site managers.
DEFAULT_FROM_EMAIL: str
Expand Down Expand Up @@ -429,10 +434,6 @@ CSRF_HEADER_NAME: str
CSRF_TRUSTED_ORIGINS: list[str]
CSRF_USE_SESSIONS: bool

# Whether to mask CSRF cookie value. It's a transitional setting helpful in
# migrating multiple instance of the same project to Django 4.1+.
CSRF_COOKIE_MASKED: bool

############
# MESSAGES #
############
Expand Down
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# Only discrepancies that appeared after Django 4.2 -> 5.0 update.
# Unsorted: there are real problems and things we can really ignore.

django.conf.FORMS_URLFIELD_ASSUME_HTTPS_DEPRECATED_MSG
django.conf.global_settings.CSRF_COOKIE_MASKED
django.conf.global_settings.FORMS_URLFIELD_ASSUME_HTTPS
django.contrib.admin.AdminSite.get_model_admin
django.contrib.admin.AllValuesFieldListFilter.get_facet_counts
django.contrib.admin.BooleanFieldListFilter.get_facet_counts
Expand Down

0 comments on commit 8b5596e

Please sign in to comment.