:py:mod:`oioioi.problems.admin` =============================== .. py:module:: oioioi.problems.admin Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.problems.admin.StatementConfigInline oioioi.problems.admin.StatementConfigAdminMixin oioioi.problems.admin.RankingVisibilityConfigInline oioioi.problems.admin.RankingVisibilityConfigAdminMixin oioioi.problems.admin.RegistrationAvailabilityConfigInline oioioi.problems.admin.RegistrationAvailabilityConfigAdminMixin oioioi.problems.admin.NameInline oioioi.problems.admin.StatementInline oioioi.problems.admin.AttachmentInline oioioi.problems.admin.ProblemInstanceInline oioioi.problems.admin.ProblemSiteInline oioioi.problems.admin.BaseTagLocalizationInline oioioi.problems.admin.BaseTagAdmin oioioi.problems.admin.OriginTagInline oioioi.problems.admin.OriginTagLocalizationInline oioioi.problems.admin.OriginTagAdmin oioioi.problems.admin.OriginInfoCategoryLocalizationInline oioioi.problems.admin.OriginInfoCategoryAdmin oioioi.problems.admin.OriginInfoValueInline oioioi.problems.admin.OriginInfoValueLocalizationInline oioioi.problems.admin.OriginInfoValueAdmin oioioi.problems.admin.DifficultyTagInline oioioi.problems.admin.DifficultyTagLocalizationInline oioioi.problems.admin.DifficultyTagAdmin oioioi.problems.admin.AlgorithmTagInline oioioi.problems.admin.AlgorithmTagLocalizationInline oioioi.problems.admin.AlgorithmTagAdmin oioioi.problems.admin.ProblemAdmin oioioi.problems.admin.BaseProblemAdmin oioioi.problems.admin.ProblemPackageAdmin oioioi.problems.admin.ContestProblemPackage oioioi.problems.admin.ContestProblemPackageAdmin oioioi.problems.admin.MainProblemInstanceAdmin Functions ~~~~~~~~~ .. autoapisummary:: oioioi.problems.admin.tag_inline oioioi.problems.admin._update_queryset_if_problems oioioi.problems.admin.pending_packages oioioi.problems.admin.pending_contest_packages Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.problems.admin.logger .. py:data:: logger .. py:class:: StatementConfigInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: extra :annotation: = 1 .. py:attribute:: form .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:class:: StatementConfigAdminMixin(*args, **kwargs) Bases: :py:obj:`object` Adds :class:`~oioioi.contests.models.ProblemStatementConfig` to an admin panel. .. py:class:: RankingVisibilityConfigInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: extra :annotation: = 1 .. py:attribute:: form .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:class:: RankingVisibilityConfigAdminMixin(*args, **kwargs) Bases: :py:obj:`object` Adds :class:`~oioioi.contests.models.RankingVisibilityConfig` to an admin panel. .. py:class:: RegistrationAvailabilityConfigInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: extra :annotation: = 1 .. py:attribute:: form .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:class:: RegistrationAvailabilityConfigAdminMixin(*args, **kwargs) Bases: :py:obj:`object` Adds :class:`~oioioi.contests.models.OpenRegistrationConfig` to an admin panel. .. py:class:: NameInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: can_delete :annotation: = False .. py:attribute:: formset .. py:attribute:: fields :annotation: = ['name', 'language'] .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:class:: StatementInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: can_delete :annotation: = False .. py:attribute:: readonly_fields :annotation: = ['language', 'content_link'] .. py:attribute:: fields .. py:attribute:: category .. py:attribute:: short_description .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:method:: content_link(instance) .. py:class:: AttachmentInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: extra :annotation: = 0 .. py:attribute:: readonly_fields :annotation: = ['content_link'] .. py:attribute:: category .. py:attribute:: short_description .. py:method:: content_link(instance) .. py:class:: ProblemInstanceInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: can_delete :annotation: = False .. py:attribute:: fields :annotation: = [] .. py:attribute:: inline_classes :annotation: = ['collapse open'] .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:class:: ProblemSiteInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: model .. py:attribute:: form .. py:attribute:: category .. py:method:: has_add_permission(request, obj=None) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:function:: tag_inline(model, form, verbose_name, verbose_name_plural, extra=0, category=_('Tags'), has_permission_func=lambda self, request, obj=None: True) .. py:function:: _update_queryset_if_problems(db_field, **kwargs) .. py:class:: BaseTagLocalizationInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:attribute:: formset .. py:class:: BaseTagAdmin(model, admin_site) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: filter_horizontal :annotation: = ['problems'] .. py:class:: OriginTagInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:class:: OriginTagLocalizationInline(parent_model, admin_site) Bases: :py:obj:`BaseTagLocalizationInline` 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. .. py:attribute:: model .. py:class:: OriginTagAdmin(model, admin_site) Bases: :py:obj:`BaseTagAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: inlines .. py:method:: formfield_for_manytomany(db_field, request, **kwargs) Get a form Field for a ManyToManyField. .. py:class:: OriginInfoCategoryLocalizationInline(parent_model, admin_site) Bases: :py:obj:`BaseTagLocalizationInline` 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. .. py:attribute:: model .. py:class:: OriginInfoCategoryAdmin(model, admin_site) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: inlines .. py:class:: OriginInfoValueInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:class:: OriginInfoValueLocalizationInline(parent_model, admin_site) Bases: :py:obj:`BaseTagLocalizationInline` 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. .. py:attribute:: model .. py:class:: OriginInfoValueAdmin(model, admin_site) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: form .. py:attribute:: inlines .. py:method:: formfield_for_manytomany(db_field, request, **kwargs) Get a form Field for a ManyToManyField. .. py:class:: DifficultyTagInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:class:: DifficultyTagLocalizationInline(parent_model, admin_site) Bases: :py:obj:`BaseTagLocalizationInline` 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. .. py:attribute:: model .. py:class:: DifficultyTagAdmin(model, admin_site) Bases: :py:obj:`BaseTagAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: inlines .. py:method:: formfield_for_manytomany(db_field, request, **kwargs) Get a form Field for a ManyToManyField. .. py:class:: AlgorithmTagInline(parent_model, admin_site) Bases: :py:obj:`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. .. py:class:: AlgorithmTagLocalizationInline(parent_model, admin_site) Bases: :py:obj:`BaseTagLocalizationInline` 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. .. py:attribute:: model .. py:class:: AlgorithmTagAdmin(model, admin_site) Bases: :py:obj:`BaseTagAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: inlines .. py:method:: formfield_for_manytomany(db_field, request, **kwargs) Get a form Field for a ManyToManyField. .. py:class:: ProblemAdmin(model, admin_site) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:class:: Media Bases: :py:obj:`object` .. py:attribute:: js :annotation: = ['problems/admin-origintag.js'] .. py:attribute:: inlines .. py:attribute:: readonly_fields :annotation: = ['author', 'legacy_name', 'short_name', 'controller_name', 'package_backend_name',... .. py:attribute:: exclude :annotation: = ['contest'] .. py:attribute:: list_filter :annotation: = ['short_name'] .. py:method:: has_add_permission(request) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:method:: redirect_to_list(request, problem) .. py:method:: response_change(request, obj) Determine the HttpResponse for the change_view stage. .. py:method:: add_view(request, form_url='', extra_context=None) .. py:method:: download_view(request, object_id) .. py:method:: get_queryset(request) Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view. .. py:method:: delete_view(request, object_id, extra_context=None) .. py:method:: get_readonly_fields(request, obj=None) Hook for specifying custom readonly fields. .. py:method:: change_view(request, object_id, form_url='', extra_context=None) .. py:class:: BaseProblemAdmin(*args, **kwargs) Bases: :py:obj:`oioioi.base.admin.MixinsAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: default_model_admin .. py:method:: _mixins_for_instance(request, instance=None) .. py:method:: reupload_view(request, object_id) .. py:method:: download_view(request, object_id) .. py:method:: get_urls() .. py:function:: pending_packages(request) .. py:function:: pending_contest_packages(request) .. py:class:: ProblemPackageAdmin(*args, **kwargs) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: list_display :annotation: = ['contest', 'problem_name', 'colored_status', 'created_by', 'creation_date', 'package_info'] .. py:attribute:: list_filter :annotation: = ['status', 'problem_name', 'contest'] .. py:attribute:: actions :annotation: = ['delete_selected'] .. py:attribute:: short_description .. py:attribute:: short_description .. py:attribute:: admin_order_field :annotation: = status .. py:attribute:: short_description .. py:method:: has_add_permission(request) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_view_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:method:: delete_selected(request, queryset) .. py:method:: colored_status(instance) .. py:method:: package_info(instance) .. py:method:: came_from() .. py:method:: inline_actions(instance, contest) .. py:method:: actions_field(contest) .. py:method:: get_list_display(request) Return a sequence containing the fields to be displayed on the changelist. .. py:method:: get_list_filter(request) Return a sequence containing the fields to be displayed as filters in the right sidebar of the changelist page. .. py:method:: get_custom_list_select_related() 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. .. py:class:: ContestProblemPackage(*args, **kwargs) Bases: :py:obj:`oioioi.problems.models.ProblemPackage` Represents a file with data necessary for creating a :class:`~oioioi.problems.models.Problem` instance. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: proxy :annotation: = True .. py:attribute:: verbose_name .. py:class:: ContestProblemPackageAdmin(*args, **kwargs) Bases: :py:obj:`ProblemPackageAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: list_display .. py:attribute:: list_filter .. py:method:: get_queryset(request) Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:method:: came_from() .. py:method:: get_actions(request) Return a dictionary mapping the names of all actions for this ModelAdmin to a tuple of (callable, name, description) for each action. .. py:class:: MainProblemInstanceAdmin(model, admin_site) Bases: :py:obj:`oioioi.base.admin.ModelAdmin` Encapsulate all admin options and functionality for a given model. .. py:attribute:: fields :annotation: = ['problem', 'short_name'] .. py:attribute:: readonly_fields :annotation: = ['problem'] .. py:method:: has_add_permission(request) Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. .. py:method:: has_change_permission(request, obj=None) 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. .. py:method:: has_delete_permission(request, obj=None) 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. .. py:method:: response_change(request, obj) Determine the HttpResponse for the change_view stage.