Uživatel modely, signály, amdin panel a manager

Definice modelů, signálů, amdin panelů a managera.

class uzivatel.models.User(*args, **kwargs)

Class pro db model user.

save(*args, **kwargs)

save metóda pro přidelení identu celý.

class uzivatel.models.UzivatelPrihlaseniLog(id, user, prihlaseni_datum_cas, ip_adresa)
class uzivatel.models.Organizace(*args, **kwargs)

Class pro db model organizace.

save(*args, **kwargs)

save metóda pro přidelení identu celý.

class uzivatel.models.Osoba(*args, **kwargs)

Class pro db model osoba.

save(*args, **kwargs)

save metóda pro přidelení identu celý.

class uzivatel.models.UserNotificationType(*args, **kwargs)

Class pro db model typ user notifikace.

class uzivatel.models.NotificationsLog(*args, **kwargs)

Class pro db model logu notifikací.

uzivatel.signals.create_ident_cely(sender, instance: User, **kwargs)

Přidelení identu celý pro usera.

uzivatel.signals.send_deactivation_email(sender, instance: User, **kwargs)

Signál pro poslání deaktivačního emailu uživately.

uzivatel.signals.send_account_confirmed_email(sender, instance: User, created)

signál pro zaslání emailu uživately o jeho konfirmaci.

uzivatel.signals.delete_profile(sender, instance: User, *args, **kwargs)

Signál pro zaslání emailu uživately o jeho smazání.

class uzivatel.admin.UserNotificationTypeInlineForm(*args, **kwargs)

Inline form pro nastavení notifikací uživatele.

class uzivatel.admin.UserNotificationTypeInlineFormset(*args, **kwargs)
model

alias of User_notification_types

class uzivatel.admin.UserNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení notifikací uživatele.

model

alias of User_notification_types

form

alias of UserNotificationTypeInlineForm

formset

alias of UserNotificationTypeInlineFormset

get_queryset(request)

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

get_extra(request, obj=None, **kwargs)

Hook for customizing the number of extra inline forms.

class uzivatel.admin.PesNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení hlídacích psů uživatele.

model

alias of Pes

form

alias of PesForm

get_queryset(request)

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

class uzivatel.admin.PesKrajNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení hlídacích psů uživatele pro kraj.

form

alias of PesForm

class uzivatel.admin.PesOkresNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení hlídacích psů uživatele pro okres.

form

alias of PesForm

class uzivatel.admin.PesKatastrNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení hlídacích psů uživatele pro katastr.

form

alias of PesForm

class uzivatel.admin.CustomUserAdmin(model, admin_site)

Admin panel pro správu uživatele.

add_form

alias of AuthUserCreationForm

form

alias of AuthUserChangeAdminForm

model

alias of User

has_delete_permission(request, obj=None)

Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.

save_model(request, obj: User, form, change)

Given a model instance save it to the database.

log_deletion(request, object, object_repr)

Log that an object will be deleted. Note that this method must be called before the deletion.

The default implementation creates an admin LogEntry object.

get_readonly_fields(request, obj=None)

Hook for specifying custom readonly fields.

class uzivatel.admin.CustomGroupAdmin(model, admin_site)

Admin panel pro správu uživatelskych skupin.

has_delete_permission(request, obj=None)

Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.

class uzivatel.managers.CustomUserManager(*args, **kwargs)

Custom user model manager where email is the unique identifiers for authentication instead of usernames. https://testdriven.io/blog/django-custom-user-model/

create_user(email, password, **extra_fields)

Create and save a User with the given email and password.

create_superuser(email, password, **extra_fields)

Create and save a SuperUser with the given email and password.