# Path: sponsors/models/benefits.py
# class RequiredAssetMixin(AssetMixin):
#     """
#     This class should be used to implement required assets.
#     It's a mixin to get the information submitted by the user
#     and which is stored in the related asset class.
#     """
#     pass
# 
# Path: sponsors/views_admin.py
# def preview_contract_view(ModelAdmin, request, pk):
# def reject_sponsorship_view(ModelAdmin, request, pk):
# def approve_sponsorship_view(ModelAdmin, request, pk):
# def approve_signed_sponsorship_view(ModelAdmin, request, pk):
# def send_contract_view(ModelAdmin, request, pk):
# def rollback_to_editing_view(ModelAdmin, request, pk):
# def execute_contract_view(ModelAdmin, request, pk):
# def nullify_contract_view(ModelAdmin, request, pk):
# def update_related_sponsorships(ModelAdmin, request, pk):
# def list_uploaded_assets(ModelAdmin, request, pk):
# def send_sponsorship_notifications_action(ModelAdmin, request, queryset):
# def export_assets_as_zipfile(ModelAdmin, request, queryset):


from django.contrib.contenttypes.admin import GenericTabularInline
from django.contrib.contenttypes.models import ContentType
from ordered_model.admin import OrderedModelAdmin
from polymorphic.admin import PolymorphicInlineSupportMixin, StackedPolymorphicInline, PolymorphicParentModelAdmin, \
    PolymorphicChildModelAdmin
from django.db.models import Subquery
from django.template import Context, Template
from django.contrib import admin
from django.contrib.humanize.templatetags.humanize import intcomma
from django.forms import ModelForm
from django.urls import path, reverse, resolve
from django.utils.functional import cached_property
from django.utils.html import mark_safe
from mailing.admin import BaseEmailTemplateAdmin
from sponsors.models import *
from sponsors.models.benefits import RequiredAssetMixin
from sponsors import views_admin
from sponsors.forms import SponsorshipReviewAdminForm, SponsorBenefitAdminInlineForm, RequiredImgAssetConfigurationForm, \
    SponsorshipBenefitAdminForm
from cms.admin import ContentManageableModelAdmin
        )
        return mark_safe(html)

    get_custom_benefits_added_by_user.short_description = "Added by User"

    def get_custom_benefits_removed_by_user(self, obj):
        benefits = obj.user_customizations["removed_by_user"]
        if not benefits:
            return "---"

        html = "".join(
            [f"<p>{b}</p>" for b in benefits]
        )
        return mark_safe(html)

    get_custom_benefits_removed_by_user.short_description = "Removed by User"

    def rollback_to_editing_view(self, request, pk):
        return views_admin.rollback_to_editing_view(self, request, pk)

    def reject_sponsorship_view(self, request, pk):
        return views_admin.reject_sponsorship_view(self, request, pk)

    def approve_sponsorship_view(self, request, pk):
        return views_admin.approve_sponsorship_view(self, request, pk)

    def approve_signed_sponsorship_view(self, request, pk):
        return views_admin.approve_signed_sponsorship_view(self, request, pk)

    def list_uploaded_assets_view(self, request, pk):

# Path: sponsors/models/benefits.py
# class RequiredAssetMixin(AssetMixin):
#     """
#     This class should be used to implement required assets.
#     It's a mixin to get the information submitted by the user
#     and which is stored in the related asset class.
#     """
#     pass
# 
# Path: sponsors/views_admin.py
# def preview_contract_view(ModelAdmin, request, pk):
# def reject_sponsorship_view(ModelAdmin, request, pk):
# def approve_sponsorship_view(ModelAdmin, request, pk):
# def approve_signed_sponsorship_view(ModelAdmin, request, pk):
# def send_contract_view(ModelAdmin, request, pk):
# def rollback_to_editing_view(ModelAdmin, request, pk):
# def execute_contract_view(ModelAdmin, request, pk):
# def nullify_contract_view(ModelAdmin, request, pk):
# def update_related_sponsorships(ModelAdmin, request, pk):
# def list_uploaded_assets(ModelAdmin, request, pk):
# def send_sponsorship_notifications_action(ModelAdmin, request, queryset):
# def export_assets_as_zipfile(ModelAdmin, request, queryset):


# Path: sponsors/admin.py
from django.contrib.contenttypes.admin import GenericTabularInline
from django.contrib.contenttypes.models import ContentType
from ordered_model.admin import OrderedModelAdmin
from polymorphic.admin import PolymorphicInlineSupportMixin, StackedPolymorphicInline, PolymorphicParentModelAdmin, \
    PolymorphicChildModelAdmin
from django.db.models import Subquery
from django.template import Context, Template
from django.contrib import admin
from django.contrib.humanize.templatetags.humanize import intcomma
from django.forms import ModelForm
from django.urls import path, reverse, resolve
from django.utils.functional import cached_property
from django.utils.html import mark_safe
from mailing.admin import BaseEmailTemplateAdmin
from sponsors.models import *
from sponsors.models.benefits import RequiredAssetMixin
from sponsors import views_admin
from sponsors.forms import SponsorshipReviewAdminForm, SponsorBenefitAdminInlineForm, RequiredImgAssetConfigurationForm, \
    SponsorshipBenefitAdminForm
from cms.admin import ContentManageableModelAdmin

        )
        return mark_safe(html)

    get_custom_benefits_added_by_user.short_description = "Added by User"

    def get_custom_benefits_removed_by_user(self, obj):
        benefits = obj.user_customizations["removed_by_user"]
        if not benefits:
            return "---"

        html = "".join(
            [f"<p>{b}</p>" for b in benefits]
        )
        return mark_safe(html)

    get_custom_benefits_removed_by_user.short_description = "Removed by User"

    def rollback_to_editing_view(self, request, pk):
        return views_admin.rollback_to_editing_view(self, request, pk)

    def reject_sponsorship_view(self, request, pk):
        return views_admin.reject_sponsorship_view(self, request, pk)

    def approve_sponsorship_view(self, request, pk):
        return views_admin.approve_sponsorship_view(self, request, pk)

    def approve_signed_sponsorship_view(self, request, pk):
        return views_admin.approve_signed_sponsorship_view(self, request, pk)

    def list_uploaded_assets_view(self, request, pk):

        return views_admin.list_uploaded_assets(self, request, pk)