<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 基于類的通用視圖 —— 索引 # 這里的索引提供基于類的視圖的另外一種組織形式。對于每個視圖,在類繼承樹中有效的屬性和方法都顯示在該視圖的下方。按照行為進行組織的文檔,參見基于類的視圖。 ## 簡單的通用視圖 ## ### View ### `class View` 屬性 (以及訪問它們的方法): + `http_method_names` 方法 + `as_view()` + `dispatch()` + `head()` + `http_method_not_allowed()` ### TemplateView ### `class TemplateView` 屬性 (以及訪問它們的方法): + `content_type` + `http_method_names` + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `head()` + `http_method_not_allowed()` + `render_to_response()` ### RedirectView ### `class RedirectView` 屬性 (以及訪問它們的方法): + `http_method_names` + `pattern_name` + `permanent` + `query_string` + `url` [`get_redirect_url()`] 方法 + `as_view()` + `delete()` + `dispatch()` + `get()` + `head()` + `http_method_not_allowed()` + `options()` + `post()` + `put()` ## 明細視圖 ## ### DetailView ### `class DetailView` 屬性 (以及訪問它們的方法): + `content_type` + `context_object_name` [`get_context_object_name()`] + `http_method_names` + `model` + `pk_url_kwarg` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `slug_field` [`get_slug_field()`] + `slug_url_kwarg` + `template_engine` + `template_name` [`get_template_names()`] + `template_name_field` + `template_name_suffix` 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_object()` + `head()` + `http_method_not_allowed()` + `render_to_response()` ## 清單視圖 ## ### ListView ### `class ListView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `http_method_names` + `model` + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_paginator()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ## 編輯視圖 ## ### FormView ### `class FormView` 屬性 (以及訪問它們的方法): + `content_type` + `form_class` [`get_form_class()`] + `http_method_names` + `initial` [`get_initial()`] + `prefix` [`get_prefix()`] + `response_class` [`render_to_response()`] + `success_url` [`get_success_url()`] + `template_engine` + `template_name` [`get_template_names()`] 方法 + `as_view()` + `dispatch()` + `form_invalid()` + `form_valid()` + `get()` + `get_context_data()` + `get_form()` + `get_form_kwargs()` + `http_method_not_allowed()` + `post()` + `put()` ### CreateView ### `class CreateView` 屬性 (以及訪問它們的方法): + `content_type` + `context_object_name` [`get_context_object_name()`] + `fields` + `form_class` [`get_form_class()`] + `http_method_names` + `initial` [`get_initial()`] + `model` + `pk_url_kwarg` + `prefix` [`get_prefix()`] + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `slug_field` [`get_slug_field()`] + `slug_url_kwarg` + `success_url` [`get_success_url()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_field` + `template_name_suffix` 方法 + `as_view()` + `dispatch()` + `form_invalid()` + `form_valid()` + `get()` + `get_context_data()` + `get_form()` + `get_form_kwargs()` + `get_object()` + `head()` + `http_method_not_allowed()` + `post()` + `put()` + `render_to_response()` ### UpdateView ### `class UpdateView` 屬性 (以及訪問它們的方法): + `content_type` + `context_object_name` [`get_context_object_name()`] + `fields` + `form_class` [`get_form_class()`] + `http_method_names` + `initial` [`get_initial()`] + `model` + `pk_url_kwarg` + `prefix` [`get_prefix()`] + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `slug_field` [`get_slug_field()`] + `slug_url_kwarg` + `success_url` [`get_success_url()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_field` + `template_name_suffix` 方法 + `as_view()` + `dispatch()` + `form_invalid()` + `form_valid()` + `get()` + `get_context_data()` + `get_form()` + `get_form_kwargs()` + `get_object()` + `head()` + `http_method_not_allowed()` + `post()` + `put()` + `render_to_response()` ### DeleteView ### `class DeleteView` 屬性 (以及訪問它們的方法): + `content_type` + `context_object_name` [`get_context_object_name()`] + `http_method_names` + `model` + `pk_url_kwarg` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `slug_field` [`get_slug_field()`] + `slug_url_kwarg` + `success_url` [`get_success_url()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_field` + `template_name_suffix` 方法 + `as_view()` + `delete()` + `dispatch()` + `get()` + `get_context_data()` + `get_object()` + `head()` + `http_method_not_allowed()` + `post()` + `render_to_response()` ## 基于日期的視圖 ## ### ArchiveIndexView ### `class ArchiveIndexView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `http_method_names` + `model` + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_paginator()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### YearArchiveView ### `class YearArchiveView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `http_method_names` + `make_object_list` [`get_make_object_list()`] + `model` + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_paginator()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### MonthArchiveView ### `class MonthArchiveView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `http_method_names` + `model` + `month` [`get_month()`] + `month_format` [`get_month_format()`] + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_next_month()` + `get_paginator()` + `get_previous_month()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### WeekArchiveView ### `class WeekArchiveView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `http_method_names` + `model` + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` + `week` [`get_week()`] + `week_format` [`get_week_format()`] + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_paginator()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### DayArchiveView ### `class DayArchiveView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `day` [`get_day()`] + `day_format` [`get_day_format()`] + `http_method_names` + `model` + `month` [`get_month()`] + `month_format` [`get_month_format()`] + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_next_day()` + `get_next_month()` + `get_paginator()` + `get_previous_day()` + `get_previous_month()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### TodayArchiveView ### `class TodayArchiveView` 屬性 (以及訪問它們的方法): + `allow_empty` [`get_allow_empty()`] + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `day` [`get_day()`] + `day_format` [`get_day_format()`] + `http_method_names` + `model` + `month` [`get_month()`] + `month_format` [`get_month_format()`] + `ordering` [`get_ordering()`] + `paginate_by` [`get_paginate_by()`] + `paginate_orphans` [`get_paginate_orphans()`] + `paginator_class` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `template_engine` + `template_name` [`get_template_names()`] + `template_name_suffix` + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_date_list()` + `get_dated_items()` + `get_dated_queryset()` + `get_next_day()` + `get_next_month()` + `get_paginator()` + `get_previous_day()` + `get_previous_month()` + `head()` + `http_method_not_allowed()` + `paginate_queryset()` + `render_to_response()` ### DateDetailView ### `class DateDetailView` 屬性 (以及訪問它們的方法): + `allow_future` [`get_allow_future()`] + `content_type` + `context_object_name` [`get_context_object_name()`] + `date_field` [`get_date_field()`] + `day` [`get_day()`] + `day_format` [`get_day_format()`] + `http_method_names` + `model` + `month` [`get_month()`] + `month_format` [`get_month_format()`] + `pk_url_kwarg` + `queryset` [`get_queryset()`] + `response_class` [`render_to_response()`] + `slug_field` [`get_slug_field()`] + `slug_url_kwarg` + `template_engine` + `template_name` [`get_template_names()`] + `template_name_field` + `template_name_suffix` + `year` [`get_year()`] + `year_format` [`get_year_format()`] 方法 + `as_view()` + `dispatch()` + `get()` + `get_context_data()` + `get_next_day()` + `get_next_month()` + `get_object()` + `get_previous_day()` + `get_previous_month()` + `head()` + `http_method_not_allowed()` + `render_to_response()` > 譯者:[Django 文檔協作翻譯小組](http://python.usyiyi.cn/django/index.html),原文:[Flattened index](https://docs.djangoproject.com/en/1.8/ref/class-based-views/flattened-index/)。 > > 本文以 [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/cn/) 協議發布,轉載請保留作者署名和文章出處。 > > [Django 文檔協作翻譯小組](http://python.usyiyi.cn/django/index.html)人手緊缺,有興趣的朋友可以加入我們,完全公益性質。交流群:467338606。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看