oioioi.participants.admin
¶
Module Contents¶
Classes¶
Encapsulate all admin options and functionality for a given model. |
|
Encapsulate all admin options and functionality for a given model. |
|
Encapsulate all admin options and functionality for a given model. |
|
Options for inline editing of |
|
Encapsulate all admin options and functionality for a given model. |
|
Options for inline editing of |
|
Encapsulate all admin options and functionality for a given model. |
|
Adds |
|
Adds |
|
Adds contest participants to an admin panel. |
|
Options for inline editing of |
|
Adds |
- class oioioi.participants.admin.ParticipantAdmin(model, admin_site)[source]¶
Bases:
oioioi.base.admin.ModelAdmin
Encapsulate all admin options and functionality for a given model.
- 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_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.
Returns a list of fields passed to queryset.select_related By default - empty list. Override this method (instead of get_queryset()) to pass another field to the select_related.
- get_list_display(request)[source]¶
Return a sequence containing the fields to be displayed on the changelist.
- get_queryset(request)[source]¶
Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
- class oioioi.participants.admin.NoParticipantAdmin(model, admin_site)[source]¶
Bases:
ParticipantAdmin
Encapsulate all admin options and functionality for a given model.
- 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_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.
- class oioioi.participants.admin.ContestDependentParticipantAdmin(model, admin_site)[source]¶
Bases:
oioioi.base.admin.InstanceDependentAdmin
Encapsulate all admin options and functionality for a given model.
- class oioioi.participants.admin.ParticipantInline(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 theForeignKey
frommodel
to its parent. This is required ifmodel
has more than oneForeignKey
to its parent.- has_add_permission(request, obj=None)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- 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.
- class oioioi.participants.admin.RegionAdmin(model, admin_site)[source]¶
Bases:
oioioi.base.admin.ModelAdmin
Encapsulate all admin options and functionality for a given model.
- 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_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.
- class oioioi.participants.admin.OnsiteRegistrationInline(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 theForeignKey
frommodel
to its parent. This is required ifmodel
has more than oneForeignKey
to its parent.- has_add_permission(request, obj=None)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- 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.
- class oioioi.participants.admin.RegionFilter(field, request, *args, **kwargs)[source]¶
Bases:
django.contrib.admin.RelatedFieldListFilter
- class oioioi.participants.admin.OnsiteRegistrationParticipantAdmin(model, admin_site)[source]¶
Bases:
ParticipantAdmin
Encapsulate all admin options and functionality for a given model.
Returns a list of fields passed to queryset.select_related By default - empty list. Override this method (instead of get_queryset()) to pass another field to the select_related.
- class oioioi.participants.admin.RegionListFilter(request, params, model, model_admin)[source]¶
Bases:
django.contrib.admin.SimpleListFilter
- class oioioi.participants.admin.OnsiteSubmissionAdminMixin(*args, **kwargs)[source]¶
Bases:
object
Adds
RegionListFilter
filter to an admin panel.
- class oioioi.participants.admin.UserWithParticipantsAdminMixin(*args, **kwargs)[source]¶
Bases:
object
Adds
Participant
to an admin panel.
- class oioioi.participants.admin.ParticipantsRoundTimeExtensionMixin[source]¶
Bases:
object
Adds contest participants to an admin panel.
- class oioioi.participants.admin.TermsAcceptedPhraseInline(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 theForeignKey
frommodel
to its parent. This is required ifmodel
has more than oneForeignKey
to its parent.- has_add_permission(request, obj=None)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- 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.
- class oioioi.participants.admin.TermsAcceptedPhraseAdminMixin(*args, **kwargs)[source]¶
Bases:
object
Adds
TermsAcceptedPhrase
to an admin panel.