Files
django-stubs/django-stubs-generated/contrib/admin/models.pyi
2018-12-06 19:13:06 +03:00

52 lines
1.4 KiB
Python

from typing import Any, Dict, List, Optional, Union
from uuid import UUID
from django.db import models
from django.db.models.base import Model
ADDITION: int
CHANGE: int
DELETION: int
ACTION_FLAG_CHOICES: Any
class LogEntryManager(models.Manager):
creation_counter: int
model: None
name: None
use_in_migrations: bool = ...
def log_action(
self,
user_id: int,
content_type_id: int,
object_id: Union[int, str, UUID],
object_repr: str,
action_flag: int,
change_message: Union[
Dict[str, Dict[str, List[str]]], List[Dict[str, Dict[str, Union[List[str], str]]]], str
] = ...,
) -> LogEntry: ...
class LogEntry(models.Model):
content_type_id: int
id: None
user_id: int
action_time: datetime.datetime = ...
user: Any = ...
content_type: Any = ...
object_id: str = ...
object_repr: str = ...
action_flag: int = ...
change_message: str = ...
objects: Any = ...
class Meta:
verbose_name: Any = ...
verbose_name_plural: Any = ...
db_table: str = ...
ordering: Any = ...
def is_addition(self) -> bool: ...
def is_change(self) -> bool: ...
def is_deletion(self) -> bool: ...
def get_change_message(self) -> str: ...
def get_edited_object(self) -> Model: ...
def get_admin_url(self) -> Optional[str]: ...