oioioi.pa.admin

Module Contents

Classes

PARegistrationInline

Options for inline editing of model instances.

PARegistrationParticipantAdmin

Encapsulate all admin options and functionality for a given model.

PAProblemInstanceInline

Options for inline editing of model instances.

PAProblemInstanceAdminMixin

Adds PAProblemInstanceData to an admin panel.

class oioioi.pa.admin.PARegistrationInline(parent_model, admin_site)[source]

Bases: oioioi.base.admin.StackedInline

Options for inline editing of model instances.

Provide fk_name to specify the attribute name of the ForeignKey from model to its parent. This is required if model has more than one ForeignKey to its parent.

model[source]
fk_name = participant[source]
form[source]
can_delete = False[source]
inline_classes = ['collapse open'][source]
exclude = ['terms_accepted'][source]
class oioioi.pa.admin.PARegistrationParticipantAdmin(model, admin_site)[source]

Bases: oioioi.participants.admin.ParticipantAdmin

Encapsulate all admin options and functionality for a given model.

list_display[source]
inlines[source]
readonly_fields = ['user'][source]
has_add_permission(request)[source]

Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.

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.

get_actions(request)[source]

Return a dictionary mapping the names of all actions for this ModelAdmin to a tuple of (callable, name, description) for each action.

class oioioi.pa.admin.PAProblemInstanceInline(parent_model, admin_site)[source]

Bases: oioioi.base.admin.TabularInline

Options for inline editing of model instances.

Provide fk_name to specify the attribute name of the ForeignKey from model to its parent. This is required if model has more than one ForeignKey to its parent.

model[source]
fields = ['division'][source]
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.

get_readonly_fields(request, obj=None)[source]

Hook for specifying custom readonly fields.

class oioioi.pa.admin.PAProblemInstanceAdminMixin(*args, **kwargs)[source]

Bases: object

Adds PAProblemInstanceData to an admin panel.