import csv

from django.http import HttpResponse


class ExportCsvMixin:
    def export_as_csv(self, request, queryset):

        meta = self.model._meta
        field_names = [field.name for field in meta.fields]

        response = HttpResponse(content_type="text/csv")
        response["Content-Disposition"] = f"attachment; filename={meta}.csv"
        writer = csv.writer(response)

        writer.writerow(field_names)
        for obj in queryset:
            writer.writerow([getattr(obj, field) for field in field_names])

        return response

    export_as_csv.short_description = "선택된 항목 을/를 CSV 로 내보냅니다."

@@ -613,8 +613,386 @@
 %EB%82%B4%EB%B3%B4%EB%83%85%EB%8B%88%EB%8B%A4.%22%0A
+%0A%0Aclass ProblemInstanceVisibilityMixin:%0A    def hide_problem_instance(self, request, queryset):%0A        queryset.update(hidden=True)%0A%0A    def show_problem_instance(self, request, queryset):%0A        queryset.update(hidden=False)%0A%0A    hide_problem_instance.short_description = %22%EC%84%A0%ED%83%9D%EB%90%9C %ED%95%AD%EB%AA%A9 %EC%9D%84/%EB%A5%BC %EB%AC%B8%EC%A0%9C %EB%A6%AC%EC%8A%A4%ED%8A%B8%EC%97%90%EC%84%9C %EC%88%A8%EA%B9%81%EB%8B%88%EB%8B%A4.%22%0A%0A    show_problem_instance.short_description = %22%EC%84%A0%ED%83%9D%EB%90%9C %ED%95%AD%EB%AA%A9 %EC%9D%84/%EB%A5%BC %EB%AC%B8%EC%A0%9C %EB%A6%AC%EC%8A%A4%ED%8A%B8%EC%97%90%EC%84%9C %EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4.%22%0A

Add ProblemInstanceVisibilityMixin