... テンツフィールドは空のままにしておくこともできます。カスタムテンプレートにコンテンツを入れる場合に便利です。 インストール ¶ flatpages アプリをインストールするには、以下の手順に従ってください: もし設定にまだ含まれていない場合は、 'django.contrib.sites' をあ ... sites フレームワークを使用している場合は、別のサイトの ID になる可能性があります) 。 INSTALLED_APPS 設定に 'django.contrib.flatpages' を追加してください。 そして、下記のいずれかを行います: URLconf にエントリを追加します。例えば、次のようにします: urlpatt ... erns = [ path ( "pages/" , include ( "django.contrib.flatpages.urls" )), ] または: django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' を MIDDLEWARE 設定に追加します。 コマ ... ... テンツフィールドは空のままにしておくこともできます。カスタムテンプレートにコンテンツを入れる場合に便利です。 インストール ¶ flatpages アプリをインストールするには、以下の手順に従ってください: もし設定にまだ含まれていない場合は、 'django.contrib.sites' をあ ... sites フレームワークを使用している場合は、別のサイトの ID になる可能性があります) 。 INSTALLED_APPS 設定に 'django.contrib.flatpages' を追加してください。 そして、下記のいずれかを行います: URLconf にエントリを追加します。例えば、次のようにします: urlpatt ... erns = [ path ( "pages/" , include ( "django.contrib.flatpages.urls" )), ] または: django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' を MIDDLEWARE 設定に追加します。 コマ ... ... Previously everything was magically transferred to the django.models.* namespace.) Some optional applications, such as the FlatPage, Sites and Redirects apps, have been decoupled and moved into django.contrib . If you don't want to use these applications ... ... Previously everything was magically transferred to the django.models.* namespace.) Some optional applications, such as the FlatPage, Sites and Redirects apps, have been decoupled and moved into django.contrib . If you don't want to use these applications ... ... ontains_properly field lookup type contains_properly() (PreparedGeometry のメソッド) content (HttpResponse の属性) (models.FlatPage の属性) (Response の属性) content_disposition_header() (django.utils.http モジュール) content_params (HttpRequest の属性) ... enttypes.fields module django.contrib.contenttypes.forms module django.contrib.contenttypes.prefetch module django.contrib.flatpages module django.contrib.gis module django.contrib.gis.admin module django.contrib.gis.db.backends module django.contrib.gis ... eField の属性) empty_value_display (AdminSite の属性) (ModelAdmin の属性) EmptyPage EmptyResultSet enable_comments (models.FlatPage の属性) enable_nav_sidebar (AdminSite の属性) Enclosure (django.utils.feedgenerator のクラス) encode() (base_session.BaseS ... ... ontains_properly field lookup type contains_properly() (PreparedGeometry のメソッド) content (HttpResponse の属性) (models.FlatPage の属性) (Response の属性) content_disposition_header() (django.utils.http モジュール) content_params (HttpRequest の属性) ... enttypes.fields module django.contrib.contenttypes.forms module django.contrib.contenttypes.prefetch module django.contrib.flatpages module django.contrib.gis module django.contrib.gis.admin module django.contrib.gis.db.backends module django.contrib.gis ... eField の属性) empty_value_display (AdminSite の属性) (ModelAdmin の属性) EmptyPage EmptyResultSet enable_comments (models.FlatPage の属性) enable_nav_sidebar (AdminSite の属性) Enclosure (django.utils.feedgenerator のクラス) encode() (base_session.BaseS ... ... 順序の変更、行のグルーピングなど) を行うには、 fields オプションを使用してください。たとえば、以下のように、 django.contrib.flatpages.models.FlatPage モデルに対して admin フォームのよりシンプルなバージョンを定義できます。 class FlatPageAdmin ( admin . Mod ... ルで囲んでください。この例では、 url と title フィールドが同じ行に表示され、 content フィールドは次の行に表示されます: class FlatPageAdmin ( admin . ModelAdmin ): fields = [( "url" , "title" ), "content" ] ModelAdmin.fieldsets オプションとの混同の可能性 こ ... を表し、 field_options フィールドセットに関する情報のディクショナリで、表示するフィールドのリストを含みます。 django.contrib.flatpages.models.FlatPage モデルを用いた例は以下のようになります。 from django.contrib import admin class FlatPageAdmin ( admin . M ... ... your app works well with Django 1.4 and you won't have to roll back to 1.3, enable the new password hashes. django.contrib.flatpages ¶ Starting in 1.4, the FlatpageFallbackMiddleware only adds a trailing slash and redirects if the resulting URL refers to ... an existing flatpage. For example, requesting /notaflatpageoravalidurl in a previous version would redirect to /notaflatpageoravalidurl/ , whic ... h would subsequently raise a 404. Requesting /notaflatpageoravalidurl now will immediately raise a 404. Also, redirects returned by flatpages are now permanent (with 301 status code ... ... etting now silences messages of all levels. Previously, messages of ERROR level or higher were printed to the console. The FlatPage.enable_comments field is removed from the FlatPageAdmin as it's unused by the application. If your project or a third-part ... emoved. The default value of the RedirectView.permanent attribute has changed from True to False . django.contrib.sitemaps.FlatPageSitemap is removed in favor of django.contrib.flatpages.sitemaps.FlatPageSitemap . Private API django.test.utils.TestTempla ... ... 順序の変更、行のグルーピングなど) を行うには、 fields オプションを使用してください。たとえば、以下のように、 django.contrib.flatpages.models.FlatPage モデルに対して admin フォームのよりシンプルなバージョンを定義できます。 class FlatPageAdmin ( admin . Mod ... ルで囲んでください。この例では、 url と title フィールドが同じ行に表示され、 content フィールドは次の行に表示されます: class FlatPageAdmin ( admin . ModelAdmin ): fields = [( "url" , "title" ), "content" ] ModelAdmin.fieldsets オプションとの混同の可能性 こ ... を表し、 field_options フィールドセットに関する情報のディクショナリで、表示するフィールドのリストを含みます。 django.contrib.flatpages.models.FlatPage モデルを用いた例は以下のようになります。 from django.contrib import admin class FlatPageAdmin ( admin . M ... 2026年10月08日