... きます。 フラットページは、URL、タイトル、コンテンツを持つオブジェクトです。これは、 "About" や "Privacy Policy" などのワンオフの特別なページに使用します。データベースに保存する必要はあるが、カスタムのDjangoアプリを ... し、それらの URL を URLconf にハードコードすることです。 from django.contrib.flatpages import views urlpatterns += [ path ( "about-us/" , views . flatpage , kwargs = { "url" : "/about-us/" }, name = "about" ), path ( "license/" , views . flatpage , kwar ... トページを表示したい場合は、 for 節を使用して認証済みユーザーを指定する必要があります。 例: {% get_flatpages for someuser as about_pages %} 匿名ユーザーを提供すると、 get_flatpages はユーザーを提供していない場合と同じように動作します。つまり、公開されて ... ... 出しに渡せばよいのです。 from django.urls import path from django.views.generic import TemplateView urlpatterns = [ path ( "about/" , TemplateView . as_view ( template_name = "about.html" )), ] as_view() に渡されたすべての引数は、クラスで設定された属性 ... ate_name などの属性や get_context_data などのメソッドをサブクラスで上書きする方法を紹介します。たとえば、1つのテンプレート about.html だけを表示するビューを作ることを考えてみてください。Django には、このために利用できるジェネリックビュー TemplateView ... 化し、テンプレート名を上書きすることで実装できます。 # some_app/views.py from django.views.generic import TemplateView class AboutView ( TemplateView ): template_name = "about.html" あとは、URLconf にこの新しいビューを追加する必要があります。 TemplateVi ... ... database itself contains constraints named in the old form; this will cause the database server to raise an error message about modifying nonexistent constraints. If you need to work around this, there are two methods available: Redirect the output o ... ases. We recommend that anyone new to form handling skip the old forms system and start with the new. For more information about django.newforms , read the newforms documentation . URLconf improvements You can now use any callable as the callback in U ... one: dedicated views for adding and updating users have been added to the admin interface, so you no longer need to worry about working with hashed passwords in the admin. ありがとう Since 0.95, a number of people have stepped forward and taken a maj ... ... , we recommend referring to the official Python documentation , which provides comprehensive and authoritative information about the language, as well as links to other resources such as a list of books about Python . ... ... lds. It's no longer valid and has been moved to the ModelAdmin class in admin.py . See the admin , below, for more details about changes to the admin. Remove core Remove the core argument from your model fields. It is no longer necessary, since the eq ... ivalent functionality (part of inline editing ) is handled differently by the admin interface now. You don't have to worry about inline editing until you get to the admin section, below. For now, remove all references to core . Replace class Admin: wi ... lapse" }), ( "group2" , { "fields" : ( "spam" , "eggs" ), "classes" : "collapse wide" }), ) 参考 More detailed information about the changes and the reasons behind them can be found on the NewformsAdminBranch wiki page The new admin comes with a ton o ... ... で貢献できます。 Communication channels We're passionate about helping Django users make the jump to contributing members of the community. Communication is key - working on Django is b ... eing part of a conversation. Join it, to become familiar with what we're doing and how we talk about it. You'll be able to form relationships with more experienced contributors who are there to help guide you towards succes ... he Django Discord server to discuss and answer questions. By explaining Django to other users, you're going to learn a lot about the framework yourself. Django に関するブログを書いてください。私たちは知り得た Django のブログを全て community page 上にま ... ... 役に立ちます。 URL パターンの例: from django.conf.urls.i18n import i18n_patterns from django.urls import include , path from about import views as about_views from news import views as news_views from sitemap.views import sitemap urlpatterns = [ path ( ... ), path ( "<slug:slug>/" , news_views . details , name = "detail" ), ], "news" , ) urlpatterns += i18n_patterns ( path ( "about/" , about_views . main , name = "about" ), path ( "news/" , include ( news_patterns , namespace = "news" )), ) これらの UR ... 8n import i18n_patterns from django.urls import include , path from django.utils.translation import gettext_lazy as _ from about import views as about_views from news import views as news_views from sitemaps.views import sitemap urlpatterns = [ path ( ... ... ssibility Guidelines (ATAG) 2.0 – guidelines for software and services that are used to produce web content. To learn more about accessibility without diving straight into standards, we recommend The A11Y Project , a community-driven effort to make di ... cessibility targets. We actively work on fixing issues, both as part of ongoing maintenance and bigger overhauls. To learn about known issues, and get involved, see: #accessibility on the Django Discord server . The Accessibility Django forum topic . ... ... ing its lifetime. Unreviewed (未レビュー) The ticket has not been reviewed by anyone who felt qualified to make a judgment about whether the ticket contained a valid issue or ought to be closed for any reasons. Unreviewed tickets appear in the "triage ... d that the reporter of the ticket may not be happy to have their ticket closed (unless it's fixed!). If you're not certain about closing a ticket, leave a comment with your thoughts instead. If you do close a ticket, you should always make sure of the ... oss-reference the closed ticket by leaving a comment in the original one -- this allows to access more related information about the reported bug or requested feature. 礼儀正しくする。 チケットが閉じられて嬉しい人はいません。苛々させたり、落胆させてし ... ... class StaticViewSitemap ( sitemaps . Sitemap ): priority = 0.5 changefreq = "daily" def items ( self ): return [ "main" , "about" , "license" ] def location ( self , item ): return reverse ( item ) # urls.py from django.contrib.sitemaps.views import s ... rt views sitemaps = { "static" : StaticViewSitemap , } urlpatterns = [ path ( "" , views . main , name = "main" ), path ( "about/" , views . about , name = "about" ), path ( "license/" , views . license , name = "license" ), # ... path ( "sitemap.xml" ... 2026年10月08日