tcms.kiwi_auth.admin module

class tcms.kiwi_auth.admin.GroupAdminForm(*args, **kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

fields = ['name', 'permissions']
model

alias of 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>}
property media

Return all media required to render the widgets on this form.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

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

Bases: GroupAdmin

form

alias of GroupAdminForm

get_fields(request, obj=None)[source]

Hook for specifying fields.

get_readonly_fields(request, obj=None)[source]

Hook for specifying custom readonly fields.

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.

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

Bases: UserAdmin

delete_model(request, obj)[source]

Given a model instance delete it from the database.

delete_view(request, object_id, extra_context=None)[source]
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 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')
property 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]