per page, with , order by , clip by
Results of 1 - 10 of about 98 for site (0.007 sec.)
"sites" フレームワーク 16648
"sites" フレームワーク Django にはオプションで "sites" フレームワークが付属しています。これは、オブジェクトや機能を特定の Web サイトに関連付けるためのフックで、 Django で動くサイトのドメイン名や "冗長な" 名前を保持する場所です。 1 つの Djan ... go インストールで複数のサイトを運用し、これらのサイトを何らかの方法で区別する必要がある場合に使用します。 sites フレームワークは、主にこのモデルに基づいています: class models. Site ウェブサイトの domain と name 属性を格納するモデル。 ... ェブサイトに関連付けられた完全修飾ドメイン名。たとえば、 www.example.com 。 name 人間が読める "冗長な" ウェブサイトの名前。 SITE_ID 設定は、その特定の設定ファイルに関連付けられている Site オブジェクトのデータベース ID を指定します。この設定が省略された ... 場合、 get_current_site() 関数は、 domain と request.get_host() メソッドからのホスト名を比較することで、現在のサイトを取得しようとします。 これをど ...
https://man.mtool.work/django/6.1/ref/contrib/sites.html
Django の admin サイト 11721
Django の admin サイト Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、モデル中心のインタフェースを提供します。このインタフェースのおかげで、ユーザはあなたのサイトの ... う: from django.contrib import admin from myapp.models import Author class AuthorAdmin ( admin . ModelAdmin ): pass admin . site . register ( Author , AuthorAdmin ) いつでも ModelAdmin オブジェクトが必要なのか? 上記の例では、ModelAdminクラスはカスタム ... 録できます。上記の例は、次のように簡略化できます。 from django.contrib import admin from myapp.models import Author admin . site . register ( Author ) register デコレータ register ( * models , site = django.contrib.admin.sites.site ) [ソース] ModelAdm ... r ) class AuthorAdmin ( admin . ModelAdmin ): pass 1 つ以上のモデルが与えられ、 ModelAdmin に登録されます。カスタムの AdminSite を使用している場合、 site キーワード引数を使って渡してください: from django.contrib import admin from .models import Autho ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
はじめての Django アプリ作成、その 7 8585
はじめての Django アプリ作成、その 7 このチュートリアルは チュートリアル その6 の続きです。ここでは、引き続き Web 投票アプリケーションの開発を続け、 チュートリアル その2 で少し触れた、Django が 自動生成する管理サイトのカスタマイズに焦点を当 ... チュートリアルの実行に問題がある場合は、FAQ の Getting Help セクションに進んでください。 admin フォームのカスタマイズ admin.site.register(Question) の呼び出しによって Question モデルを登録したことで、Django はデフォルトの形式でオブジェクトを表示できま ... ブジェクトを登録する時にオプションを指定します。 ためしに、編集フォームでのフィールドの並び順を並べ替えてみましょう。 admin.site.register(Question) の行を以下のように置き換えてみてください。 polls/admin.py from django.contrib import admin from .models ... import Question class QuestionAdmin ( admin . ModelAdmin ): fields = [ "pub_date" , "question_text" ] admin . site . register ( Question , QuestionAdmin ) このように、モデルの admin のオプションを変更したいときには、モデルごとに admin ク ...
https://man.mtool.work/django/6.1/intro/tutorial07.html
テンプレートをオーバーライドする 8520
テンプレートをオーバーライドする プロジェクトでは、 django.contrib.admin のような contrib アプリケーションやサードパーティアプリケーションで Djangoアプリケーションのテンプレートを上書きすることができます。 テンプレートの上書きは、プロジェク ... 。これにより、テンプレート全体を再実装することなく、少しだけカスタマイズできます。 例えば、このテクニックを使って admin/base_site.html テンプレートにカスタムロゴを追加できます: templates/admin/base_site.html {% extends "admin/base_site.html" %} {% bloc ... %} < img src = "link/to/logo.png" alt = "logo" > {{ block .super }} {% endblock %} 備考: この例では、 templates/admin/base_site.html にファイルを作成し、 admin/base_site.html を上書きするために、設定されたプロジェクトレベルの templates ディレクトリを ... 使用します。 新しいテンプレートは admin/base_site.html を継承しており、これはオーバーライドされるテンプレートと同じです。 このテンプレートは branding ブロックだけを置き換え ...
https://man.mtool.work/django/6.1/howto/overriding-templates.html
Django におけるセキュリティ 8454
Django におけるセキュリティ このドキュメントは、Django のセキュリティ機能の概要です。Django を利用したサイトを安全なものにするためのヒントを説明します。 Real-world security Django's web security implementations have been designed with secur ... al attention to their needs. Web security requires a multi-layered approach. Securing only a single vector does not make a site secure overall, nor does a single apparent weakness necessarily compromise the entire site. This should be borne in mind p ... )する必要があります。Django におけるユーザー入力の検証については、 フォームに関するドキュメント を参照してください。 Cross-site scripting (XSS) protection In a cross-site scripting attack, malicious code in the form of a client-side script is injecte ... s, or getting users to click a link which will cause the attacker's JavaScript to be executed by the user's browser. Cross-site scripting attacks can originate from any untrusted source of data, including cookies or web services, if the data are not ...
https://man.mtool.work/django/6.1/topics/security.html
Django 3.1 リリースノート 7945
Django 3.1 リリースノート August 4, 2020 Django 3.1 へようこそ! このリリースノートでは、 バージョン 3.1 の新機能 と、Django 3.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... al setting allows specifying the default hashing algorithm to use for encoding cookies, password reset tokens in the admin site, user sessions, and signatures created by django.core.signing.Signer and django.core.signing.dumps() . Support for SHA-256 ... has a sidebar on larger screens for easier navigation. It is enabled by default but can be disabled by using a custom AdminSite and setting AdminSite.enable_nav_sidebar to False . Rendering the sidebar requires access to the current request in order ... aint.deferrable attribute allows creating deferrable exclusion constraints. django.contrib.sessions The SESSION_COOKIE_SAMESITE setting now allows 'None' (string) value to explicitly state that the cookie is sent with all same-site and cross-site req ...
https://man.mtool.work/django/6.1/releases/3.1.html
Pythonモジュール索引 7487
Pythonモジュール索引 a | c | d | f | h | m | s | t | u | v a django.apps c django.conf django.conf.urls django.conf.urls.i18n django.contrib django.contrib.admin Django's admin site. django.contrib.admindocs Django's admin documentation gen ... gis Geographic Information System (GIS) extensions for Django django.contrib.gis.admin GeoDjango's extensions to the admin site. django.contrib.gis.db.backends GeoDjango's spatial database backends. django.contrib.gis.db.models GeoDjango model and fi ... ons Provides session management for Django projects. django.contrib.sessions.middleware Session middleware. django.contrib.sitemaps A framework for generating Google sitemap XML files. django.contrib.sites Lets you operate multiple websites from the ... same database and Django project django.contrib.sites.middleware Site middleware. django.contrib.staticfiles An app for handling static files. django.contrib.syndication A fra ...
https://man.mtool.work/django/6.1/py-modindex.html
Django 1.11.15 リリースノート 7487
Django 1.11.15 リリースノート 2018年8月1日 Django 1.11.15 では、1.11.14 にあった1つのセキュリティの問題を修正しました。 CVE-2018-14574: CommonMiddleware に対するオープンリダイレクトの可能性 If the CommonMiddleware and the APPEND_SLASH setti ... ding in a slash (many content management systems have such a pattern), then a request to a maliciously crafted URL of that site could lead to a redirect to another site, enabling phishing and other attacks. CommonMiddleware now escapes leading slashe ...
https://man.mtool.work/django/6.1/releases/1.11.15.html
redirects (リダイレクト)アプリ 7304
redirects (リダイレクト)アプリ Django にはオプションで redirects (リダイレクト) アプリケーションが付属しています。リダイレクトをデータベースに保存し、リダイレクトを処理します。デフォルトでは HTTP 応答ステータスコード 301 Moved Permanently ... を使います。 インストール redirects アプリをインストールするには、以下の手順に従ってください: django.contrib.sites フレームワークが インストールされていること を確認してください。 'django.contrib.redirects' を INSTALLED_APPS 設定に追加し ... manage.py migrate を実行します。 しくみ manage.py migrate はデータベースに django_redirect テーブルを作成します。これは、 site_id 、 old_path 、および new_path フィールドを持つルックアップテーブルです。 RedirectFallbackMiddleware が全ての作業を担当し ... ウェアは要求されたURLが最終手段としてリダイレクトデータベースをチェックします。具体的には、与えられた old_path とサイトIDが SITE_ID 設定に対応するリダイレクトを確認します。 一致するものが見つかり、かつ new_path が空でない場合、301 ("Moved Perman ...
https://man.mtool.work/django/6.1/ref/contrib/redirects.html
配信 (syndication) フィード フレームワーク 7304
配信 (syndication) フィード フレームワーク Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワークが付属しています。 任意の配信フィードを作成するには、短い Python クラスを書くだけで済みます。 ... ています: from django.contrib.syndication.views import Feed from django.urls import reverse from policebeat.models import NewsItem class LatestEntriesFeed ( Feed ): title = "Police beat site news" link = "/sitenews/" description = "Updates on changes a ... nd additions to police beat central." def items ( self ): return NewsItem . objects . order_by ( "-pub_date" )[: 5 ] def item_title ( self , item ): return item . title def item_description ( sel ... f , item ): return item . description # item_link is only needed if NewsItem has no get_absolute_url method. def item_link ( self , item ): return reverse ( "news-item" , args = [ item . pk ]) このフ ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT