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ý.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

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í.

class uzivatel.models.HistoricalUser(id, password, last_login, is_superuser, ident_cely, first_name, last_name, email, is_staff, is_active, date_joined, jazyk, sha_1, telefon, osoba, organizace, history_vazba, history_id, history_date, history_change_reason, history_type, history_user)
static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

instance_type

alias of User

property next_record

Get the next history record for the instance. None if last.

property prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

uzivatel.signals.create_ident_cely(sender, instance, **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_new_user_email_to_admin(sender, instance: User, created)

Signál pro zaslání info o nově registrovaném uživately adminovy.

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, *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.UserNotificationTypeInline(parent_model, admin_site)

Inline panel pro nastavení notifikací uživatele.

model

alias of User_notification_types

form

alias of UserNotificationTypeInlineForm

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.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

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.

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.