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.ModelAdminEncapsulate 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:
ParticipantAdminEncapsulate 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.InstanceDependentAdminEncapsulate all admin options and functionality for a given model.
- class oioioi.participants.admin.ParticipantInline(parent_model, admin_site)[source]¶
Bases:
oioioi.base.admin.TabularInlineOptions for inline editing of
modelinstances.Provide
fk_nameto specify the attribute name of theForeignKeyfrommodelto its parent. This is required ifmodelhas more than oneForeignKeyto 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.ModelAdminEncapsulate 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.TabularInlineOptions for inline editing of
modelinstances.Provide
fk_nameto specify the attribute name of theForeignKeyfrommodelto its parent. This is required ifmodelhas more than oneForeignKeyto 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:
ParticipantAdminEncapsulate 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:
objectAdds
RegionListFilterfilter to an admin panel.
- class oioioi.participants.admin.UserWithParticipantsAdminMixin(*args, **kwargs)[source]¶
Bases:
objectAdds
Participantto an admin panel.
- class oioioi.participants.admin.ParticipantsRoundTimeExtensionMixin[source]¶
Bases:
objectAdds contest participants to an admin panel.
- class oioioi.participants.admin.TermsAcceptedPhraseInline(parent_model, admin_site)[source]¶
Bases:
oioioi.base.admin.StackedInlineOptions for inline editing of
modelinstances.Provide
fk_nameto specify the attribute name of theForeignKeyfrommodelto its parent. This is required ifmodelhas more than oneForeignKeyto 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:
objectAdds
TermsAcceptedPhraseto an admin panel.