tcms.kiwi_auth.admin module

class tcms.kiwi_auth.admin.KiwiUserAdmin(model, admin_site)[source]

Bases: django.contrib.auth.admin.UserAdmin

delete_view(request, object_id, extra_context=None)[source]
form

alias of MyUserChangeForm

get_fieldsets(request, obj=None)[source]

Hook for specifying fieldsets.

get_readonly_fields(request, obj=None)[source]

Hook for specifying custom readonly fields.

has_change_permission(request, obj=None)[source]

Return True if the given request has permission to change 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 change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.

has_delete_permission(request, obj=None)[source]

Return True if the given request has permission to change 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.

list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_superuser', 'date_joined', 'last_login')
media
ordering = ['-pk']
render_change_form(request, context, add=False, change=False, form_url='', obj=None)[source]
response_delete(request, obj_display, obj_id)[source]

Determine the HttpResponse for the delete_view stage.

user_change_password(request, id, form_url='')[source]
class tcms.kiwi_auth.admin.MyUserChangeForm(*args, **kwargs)[source]

Bases: django.contrib.auth.forms.UserChangeForm

Enforces unique user emails.

base_fields = {'date_joined': <django.forms.fields.DateTimeField object at 0x7fcb2e7dee10>, 'email': <django.forms.fields.EmailField object at 0x7fcb2e7d5470>, 'first_name': <django.forms.fields.CharField object at 0x7fcb2e7de6d8>, 'groups': <django.forms.models.ModelMultipleChoiceField object at 0x7fcb2e7de160>, 'is_active': <django.forms.fields.BooleanField object at 0x7fcb2e7ded30>, 'is_staff': <django.forms.fields.BooleanField object at 0x7fcb2e7dec18>, 'is_superuser': <django.forms.fields.BooleanField object at 0x7fcb2e7de0f0>, 'last_login': <django.forms.fields.DateTimeField object at 0x7fcb2e7d5a20>, 'last_name': <django.forms.fields.CharField object at 0x7fcb2e7de898>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x7fcb2e7a2b70>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object at 0x7fcb2e7de2b0>, 'username': <django.contrib.auth.forms.UsernameField object at 0x7fcb2e7de4a8>}
clean_email()[source]
declared_fields = {'email': <django.forms.fields.EmailField object at 0x7fcb2e7d5470>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x7fcb2e7a2b70>}
media