tcms.kiwi_auth.admin module¶
-
class
tcms.kiwi_auth.admin.
GroupAdminForm
(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
fields
= ['name', 'permissions']¶
-
model
¶ alias of
django.contrib.auth.models.Group
-
-
base_fields
= {'name': <django.forms.fields.CharField object>, 'permissions': <django.forms.models.ModelMultipleChoiceField object>, 'users': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {'users': <django.forms.models.ModelMultipleChoiceField object>}¶
-
media
¶
-
class
-
class
tcms.kiwi_auth.admin.
KiwiGroupAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.auth.admin.GroupAdmin
-
form
¶ alias of
GroupAdminForm
-
has_delete_permission
(request, obj=None)[source]¶ 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.
-
media
¶
-
-
class
tcms.kiwi_auth.admin.
KiwiUserAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.auth.admin.UserAdmin
-
form
¶ alias of
MyUserChangeForm
-
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 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.
-
has_view_permission
(request, obj=None)[source]¶ Return True if the given request has permission to view the given Django model instance. The default implementation doesn’t examine the obj parameter.
If overridden by the user in subclasses, it should return True if the given request has permission to view the obj model instance. If obj is None, it should return True if the request has permission to view any object of the given type.
-
list_display
= ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_active', 'is_superuser', 'date_joined', 'last_login')¶
-
media
¶
-
ordering
= ['-pk']¶
-
-
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>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_staff': <django.forms.fields.BooleanField object>, 'is_superuser': <django.forms.fields.BooleanField object>, 'last_login': <django.forms.fields.DateTimeField object>, 'last_name': <django.forms.fields.CharField object>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object>, 'username': <django.contrib.auth.forms.UsernameField object>}¶
-
declared_fields
= {'email': <django.forms.fields.EmailField object>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>}¶
-
media
¶
-