File: __init__.pyi

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (44 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from typing import Any, Literal, type_check_only

from django.utils.functional import LazyObject
from typing_extensions import Self

# explicit dependency on standard settings to make it loaded
from . import global_settings  # noqa: F401

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):
    def __getattr__(self, item: Any) -> Any: ...

class LazySettings(_DjangoConfLazyObject):
    SETTINGS_MODULE: str
    @property
    def configured(self) -> bool: ...
    def configure(self, default_settings: Any = ..., **options: Any) -> None: ...

settings: LazySettings

class Settings:
    SETTINGS_MODULE: str
    def __init__(self, settings_module: str) -> None: ...
    def is_overridden(self, setting: str) -> bool: ...

class UserSettingsHolder:
    SETTINGS_MODULE: None
    def __init__(self, default_settings: Any) -> None: ...
    def __getattr__(self, name: str) -> Any: ...
    def __setattr__(self, name: str, value: Any) -> None: ...
    def __delattr__(self, name: str) -> None: ...
    def is_overridden(self, setting: str) -> bool: ...

class SettingsReference(str):
    def __new__(self, value: Any, setting_name: str) -> Self: ...
    def __init__(self, value: str, setting_name: str) -> None: ...