... repare a map of common locations to timezone choices you wish to offer. common_timezones = { "London" : "Europe/London" , "Paris" : "Europe/Paris" , "New York" : "America/New_York" , } def set_timezone ( request ): if request . method == "POST" : requ ... す。カレントタイムゾーンがセットされていないときは、デフォルトタイムゾーンが適用されます。 {% load tz %} {% timezone "Europe/Paris" %} Paris time: {{ value }} {% endtimezone %} {% timezone None %} Server time: {{ value }} {% endtimezone %} get_current_t ... インスタンスか、タイムゾーンの名前である必要があります。 例えば次のようにします: {% load tz %} {{ value | timezone :"Europe/Paris" }} マイグレーションガイド ¶ 以下は、Django がタイムゾーンをサポートする以前に開始したプロジェクトをマイグレーションする方 ... ... repare a map of common locations to timezone choices you wish to offer. common_timezones = { "London" : "Europe/London" , "Paris" : "Europe/Paris" , "New York" : "America/New_York" , } def set_timezone ( request ): if request . method == "POST" : requ ... す。カレントタイムゾーンがセットされていないときは、デフォルトタイムゾーンが適用されます。 {% load tz %} {% timezone "Europe/Paris" %} Paris time: {{ value }} {% endtimezone %} {% timezone None %} Server time: {{ value }} {% endtimezone %} get_current_t ... インスタンスか、タイムゾーンの名前である必要があります。 例えば次のようにします: {% load tz %} {{ value | timezone :"Europe/Paris" }} マイグレーションガイド ¶ 以下は、Django がタイムゾーンをサポートする以前に開始したプロジェクトをマイグレーションする方 ... ... とより理解しやすくなります: >>> from urllib.parse import quote >>> from django.utils.encoding import iri_to_uri >>> quote ( "Paris & Orléans" ) 'Paris%20%26%20Orl%C3%A9ans' >>> iri_to_uri ( "/favorites/François/ %s " % quote ( "Paris & Orléans" )) '/fav ... orites/Fran%C3%A7ois/Paris%20%26%20Orl%C3%A9ans' よく見ると、2番目の例で quote() によって生成された部分が iri_to_uri() に渡された際に二重引用符で囲ま ... "/person/ %s /?x=0&y=0" % quote ( self . location ) return iri_to_uri ( url ) この関数は、 self.location が "Jack visited Paris & Orléans" のようなものであっても、正しくエンコードされた URL を返します。(実際には、上記の例では iri_to_uri() 呼び出しは ... ... とより理解しやすくなります: >>> from urllib.parse import quote >>> from django.utils.encoding import iri_to_uri >>> quote ( "Paris & Orléans" ) 'Paris%20%26%20Orl%C3%A9ans' >>> iri_to_uri ( "/favorites/François/ %s " % quote ( "Paris & Orléans" )) '/fav ... orites/Fran%C3%A7ois/Paris%20%26%20Orl%C3%A9ans' よく見ると、2番目の例で quote() によって生成された部分が iri_to_uri() に渡された際に二重引用符で囲ま ... "/person/ %s /?x=0&y=0" % quote ( self . location ) return iri_to_uri ( url ) この関数は、 self.location が "Jack visited Paris & Orléans" のようなものであっても、正しくエンコードされた URL を返します。(実際には、上記の例では iri_to_uri() 呼び出しは ... 2026年10月08日