mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 12:44:29 +08:00
75 lines
1.9 KiB
Python
75 lines
1.9 KiB
Python
from django.contrib.auth.forms import AdminPasswordChangeForm
|
|
from django.db.models.fields import AutoField
|
|
from django.forms.utils import ErrorDict
|
|
from django.forms.widgets import Media
|
|
from django.utils.safestring import SafeText
|
|
from typing import (
|
|
Any,
|
|
Callable,
|
|
Dict,
|
|
Iterator,
|
|
List,
|
|
Tuple,
|
|
Union,
|
|
)
|
|
|
|
|
|
class AdminField:
|
|
def errors(self) -> SafeText: ...
|
|
def label_tag(self) -> SafeText: ...
|
|
|
|
|
|
class AdminForm:
|
|
def __init__(
|
|
self,
|
|
form: AdminPasswordChangeForm,
|
|
fieldsets: List[Tuple[None, Dict[str, List[str]]]],
|
|
prepopulated_fields: Dict[Any, Any],
|
|
readonly_fields: None = ...,
|
|
model_admin: None = ...
|
|
) -> None: ...
|
|
def __iter__(self) -> Iterator[Fieldset]: ...
|
|
@property
|
|
def errors(self) -> ErrorDict: ...
|
|
@property
|
|
def media(self) -> Media: ...
|
|
@property
|
|
def non_field_errors(self) -> Callable: ...
|
|
|
|
|
|
class AdminReadonlyField:
|
|
def contents(self) -> SafeText: ...
|
|
def label_tag(self) -> SafeText: ...
|
|
|
|
|
|
class Fieldline:
|
|
def __iter__(
|
|
self
|
|
) -> Iterator[Union[AdminField, AdminReadonlyField]]: ...
|
|
def errors(self) -> SafeText: ...
|
|
|
|
|
|
class Fieldset:
|
|
def __iter__(self) -> Iterator[Fieldline]: ...
|
|
@property
|
|
def media(self) -> Media: ...
|
|
|
|
|
|
class InlineAdminForm:
|
|
def __iter__(self) -> Iterator[InlineFieldset]: ...
|
|
def deletion_field(self) -> AdminField: ...
|
|
def fk_field(self) -> AdminField: ...
|
|
def needs_explicit_pk_field(self) -> Union[bool, AutoField]: ...
|
|
def pk_field(self) -> AdminField: ...
|
|
|
|
|
|
class InlineAdminFormSet:
|
|
def __iter__(self) -> Iterator[InlineAdminForm]: ...
|
|
def fields(self) -> Iterator[Dict[str, Any]]: ...
|
|
def inline_formset_data(self) -> str: ...
|
|
@property
|
|
def media(self) -> Media: ...
|
|
|
|
|
|
class InlineFieldset:
|
|
def __iter__(self) -> Iterator[Fieldline]: ... |