```{module} wagtail.admin.viewsets ``` (viewsets_reference)= # 뷰셋 뷰셋은 공유 속성을 가진 관련 관리자 뷰 그룹을 단일 단위로 정의하기 위한 Wagtail의 메커니즘입니다. ## ViewSet ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.base.ViewSet .. autoattribute:: name .. autoattribute:: url_prefix .. autoattribute:: url_namespace .. automethod:: on_register .. automethod:: get_urlpatterns .. automethod:: get_url_name .. autoattribute:: icon .. autoattribute:: menu_icon :attr:`icon` 으로 기본 설정됩니다. .. autoattribute:: menu_label .. autoattribute:: menu_name .. autoattribute:: menu_order .. autoattribute:: menu_url :meth:`get_urlpatterns` 에서 반환된 첫 번째 URL로 기본 설정됩니다. .. autoattribute:: menu_item_class .. autoattribute:: menu_hook .. autoattribute:: add_to_admin_menu .. autoattribute:: add_to_settings_menu .. automethod:: get_menu_item ``` ## ViewSetGroup ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.base.ViewSetGroup .. attribute:: items :value: () 함께 그룹화할 :class:`~wagtail.admin.viewsets.base.ViewSet` 클래스 또는 인스턴스 목록 또는 튜플입니다. .. autoattribute:: menu_icon .. autoattribute:: menu_label .. autoattribute:: menu_name .. autoattribute:: menu_order .. autoattribute:: menu_item_class .. autoattribute:: add_to_admin_menu .. automethod:: get_menu_item ``` ## ModelViewSet ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.model.ModelViewSet .. attribute:: model 필수; 이 뷰셋이 작동할 모델 클래스입니다. ``model_name`` 은 :attr:`~.ViewSet.name`, :attr:`~.ViewSet.url_prefix` 또는 :attr:`~.ViewSet.url_namespace` 속성을 통해 명시적으로 지정되지 않는 한 URL 접두사 및 네임스페이스로 사용됩니다. .. attribute:: form_fields 생성/편집 폼에 포함되어야 하는 모델 필드 이름 목록입니다. .. attribute:: exclude_form_fields 여기에 나열된 필드를 제외한 모델의 모든 필드가 생성/편집 폼에 나타나야 함을 나타내기 위해 :attr:`form_fields` 대신 사용됩니다. ``form_fields`` 또는 ``exclude_form_fields`` 중 하나를 제공해야 합니다(:meth:`get_form_class` 가 재정의되지 않는 한). .. automethod:: get_form_class .. automethod:: get_edit_handler .. automethod:: get_permissions_to_register .. autoattribute:: menu_label 모델의 :attr:`~django.db.models.Options.verbose_name_plural` 의 제목 대소문자 버전으로 기본 설정됩니다. .. autoattribute:: add_to_reference_index .. autoattribute:: ordering .. autoattribute:: list_per_page .. autoattribute:: list_display .. autoattribute:: list_export .. autoattribute:: list_filter .. autoattribute:: filterset_class .. autoattribute:: export_headings .. autoattribute:: export_filename .. autoattribute:: search_fields .. autoattribute:: search_backend_name .. autoattribute:: copy_view_enabled .. autoattribute:: inspect_view_enabled .. autoattribute:: inspect_view_fields .. autoattribute:: inspect_view_fields_exclude .. autoattribute:: index_view_class .. autoattribute:: add_view_class .. autoattribute:: edit_view_class .. autoattribute:: delete_view_class .. autoattribute:: usage_view_class .. autoattribute:: history_view_class .. autoattribute:: copy_view_class .. autoattribute:: inspect_view_class .. autoattribute:: template_prefix .. autoattribute:: index_template_name .. autoattribute:: index_results_template_name .. autoattribute:: create_template_name .. autoattribute:: edit_template_name .. autoattribute:: delete_template_name .. autoattribute:: history_template_name .. autoattribute:: inspect_template_name ``` ## ModelViewSetGroup ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.model.ModelViewSetGroup .. autoattribute:: menu_label 설정되지 않은 경우 첫 번째 뷰셋의 모델 :attr:`~django.db.models.Options.app_label` 의 제목 대소문자 버전으로 기본 설정됩니다. ``` ## ChooserViewSet ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.chooser.ChooserViewSet .. attribute:: model 필수; 이 뷰셋이 작동할 모델 클래스입니다. .. autoattribute:: icon .. autoattribute:: choose_one_text .. autoattribute:: page_title .. autoattribute:: choose_another_text .. autoattribute:: edit_item_text .. autoattribute:: per_page .. autoattribute:: preserve_url_parameters .. autoattribute:: url_filter_parameters .. autoattribute:: choose_view_class .. autoattribute:: choose_results_view_class .. autoattribute:: chosen_view_class .. autoattribute:: chosen_multiple_view_class .. autoattribute:: create_view_class .. autoattribute:: base_widget_class .. autoattribute:: widget_class .. autoattribute:: widget_telepath_adapter_class .. autoattribute:: register_widget .. autoattribute:: base_block_class .. automethod:: get_block_class .. autoattribute:: creation_form_class .. autoattribute:: form_fields .. autoattribute:: exclude_form_fields .. autoattribute:: create_action_label .. autoattribute:: create_action_clicked_label .. autoattribute:: creation_tab_label .. autoattribute:: search_tab_label .. method:: get_object_list 선택할 수 있는 객체의 쿼리셋을 반환합니다. 기본적으로 ``model`` 의 모든 인스턴스가 반환됩니다. ``` ## SnippetViewSet ```{eval-rst} .. autoclass:: wagtail.snippets.views.snippets.SnippetViewSet .. autoattribute:: model .. autoattribute:: chooser_per_page .. autoattribute:: admin_url_namespace .. autoattribute:: base_url_path .. autoattribute:: chooser_admin_url_namespace .. autoattribute:: chooser_base_url_path .. autoattribute:: index_view_class .. autoattribute:: add_view_class .. autoattribute:: edit_view_class .. autoattribute:: delete_view_class .. autoattribute:: usage_view_class .. autoattribute:: history_view_class .. autoattribute:: copy_view_class .. autoattribute:: inspect_view_class .. autoattribute:: revisions_view_class .. autoattribute:: revisions_revert_view_class .. autoattribute:: revisions_compare_view_class .. autoattribute:: revisions_unschedule_view_class .. autoattribute:: unpublish_view_class .. autoattribute:: preview_on_add_view_class .. autoattribute:: preview_on_edit_view_class .. autoattribute:: lock_view_class .. autoattribute:: unlock_view_class .. autoattribute:: chooser_viewset_class .. automethod:: get_queryset .. automethod:: get_edit_handler .. automethod:: get_index_template .. automethod:: get_index_results_template .. automethod:: get_create_template .. automethod:: get_edit_template .. automethod:: get_delete_template .. automethod:: get_history_template .. automethod:: get_inspect_template .. automethod:: get_admin_url_namespace .. automethod:: get_admin_base_path .. automethod:: get_chooser_admin_url_namespace .. automethod:: get_chooser_admin_base_path ``` ## SnippetViewSetGroup ```{eval-rst} .. autoclass:: wagtail.snippets.views.snippets.SnippetViewSetGroup ``` ## PageListingViewSet ```{eval-rst} .. autoclass:: wagtail.admin.viewsets.pages.PageListingViewSet .. autoattribute:: model .. autoattribute:: index_view_class .. autoattribute:: choose_parent_view_class .. autoattribute:: columns .. autoattribute:: filterset_class ```