per page, with , order by , clip by
Results of 1 - 10 of about 170 for Current (0.005 sec.)
"sites" フレームワーク — Django 6.1 ドキュメント 13434
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » "sites" フレームワーク ¶ Django にはオプションで "sites" フレームワークが付属しています。これは、オブジェクトや機能を特定の Web サイトに関連付けるた ... 、その特定の設定ファイルに関連付けられている Site オブジェクトのデータベース ID を指定します。この設定が省略された場合、 get_current_site() 関数は、 domain と request.get_host() メソッドからのホスト名を比較することで、現在のサイトを取得しようとします。 こ ... トーリーが 現在のサイトにあるかどうかをチェックします。以下のようになります: from django.contrib.sites.shortcuts import get_current_site def article_detail ( request , article_id ): try : a = Article . objects . get ( id = article_id , sites__id = get_cu ... e to hardcode the site IDs like that, in case they change. The cleaner way of accomplishing the same thing is to check the current site's domain: from django.contrib.sites.shortcuts import get_current_site def my_view ( request ): current_site = get_cur ...
https://man.mtool.work/django/6.1/ref/contrib/sites.html
"sites" フレームワーク — Django 6.1 ドキュメント 13434
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » "sites" フレームワーク ¶ Django にはオプションで "sites" フレームワークが付属しています。これは、オブジェクトや機能を特定の Web サイトに関連付けるた ... 、その特定の設定ファイルに関連付けられている Site オブジェクトのデータベース ID を指定します。この設定が省略された場合、 get_current_site() 関数は、 domain と request.get_host() メソッドからのホスト名を比較することで、現在のサイトを取得しようとします。 こ ... トーリーが 現在のサイトにあるかどうかをチェックします。以下のようになります: from django.contrib.sites.shortcuts import get_current_site def article_detail ( request , article_id ): try : a = Article . objects . get ( id = article_id , sites__id = get_cu ... e to hardcode the site IDs like that, in case they change. The cleaner way of accomplishing the same thing is to check the current site's domain: from django.contrib.sites.shortcuts import get_current_site def my_view ( request ): current_site = get_cur ...
https://man.mtool.work/django/6.1/ref/contrib/sites.html
独自のテンプレートタグとフィルタを作る — Django 6.1 ドキュメント 9035
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 独自のテンプレートタグとフィルタを作る ¶ Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された ... グは、文字列やテンプレート変数などの引数を取り、入力引数と外部情報のみに基づいて処理を行った後、結果を返します。 たとえば、 current_time タグはフォーマット文字列を受け取り、その時刻を適切な文字列フォーマットとして返します。 これらのタイプのタグの作成を容 ... 関数を取り、それを render 関数と上記で説明した他の必要なビットにラップし、そしてテンプレートシステムに登録します。 私たちの current_time 関数は、以下のように書くことができます: import datetime from django import template register = template . Library () ... @register . simple_tag def current_time ( format_string ): return datetime . datetime . now () . strftime ( format_string ) simple_tag ヘルパー関数について、 ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
独自のテンプレートタグとフィルタを作る — Django 6.1 ドキュメント 9035
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 独自のテンプレートタグとフィルタを作る ¶ Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された ... グは、文字列やテンプレート変数などの引数を取り、入力引数と外部情報のみに基づいて処理を行った後、結果を返します。 たとえば、 current_time タグはフォーマット文字列を受け取り、その時刻を適切な文字列フォーマットとして返します。 これらのタイプのタグの作成を容 ... 関数を取り、それを render 関数と上記で説明した他の必要なビットにラップし、そしてテンプレートシステムに登録します。 私たちの current_time 関数は、以下のように書くことができます: import datetime from django import template register = template . Library () ... @register . simple_tag def current_time ( format_string ): return datetime . datetime . now () . strftime ( format_string ) simple_tag ヘルパー関数について、 ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
データベースの計測 — Django 6.1 ドキュメント 8166
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースの計測 ¶ コードから発行されたクエリを理解して制御するために、Django は、データベースクエリの実行周辺にラッパー関数をインストールするため ... QueryLogger : def __init__ ( self ): self . queries = [] def __call__ ( self , execute , sql , params , many , context ): current_query = { "sql" : sql , "params" : params , "many" : many } start = time . monotonic () try : result = execute ( sql , par ... ams , many , context ) except Exception as e : current_query [ "status" ] = "error" current_query [ "exception" ] = e raise else : current_query [ "status" ] = "ok" return resul ... t finally : duration = time . monotonic () - start current_query [ "duration" ] = duration self . queries . append ( current_query ) これを使用するには、ロガーオブジェクトを作成し、 ...
https://man.mtool.work/django/6.1/topics/db/instrumentation.html
データベースの計測 — Django 6.1 ドキュメント 8087
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースの計測 ¶ コードから発行されたクエリを理解して制御するために、Django は、データベースクエリの実行周辺にラッパー関数をインストールするため ... QueryLogger : def __init__ ( self ): self . queries = [] def __call__ ( self , execute , sql , params , many , context ): current_query = { "sql" : sql , "params" : params , "many" : many } start = time . monotonic () try : result = execute ( sql , par ... ams , many , context ) except Exception as e : current_query [ "status" ] = "error" current_query [ "exception" ] = e raise else : current_query [ "status" ] = "ok" return resul ... t finally : duration = time . monotonic () - start current_query [ "duration" ] = duration self . queries . append ( current_query ) これを使用するには、ロガーオブジェクトを作成し、 ...
https://man.mtool.work/django/6.1/topics/db/instrumentation.html
Django 1.9 リリースノート — Django 6.1 ドキュメント 7614
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.9 リリースノート ¶ December 1, 2015 Django 1.9 へようこそ! このリリースノートでは、 バージョン 1.9 の新機能 と、Django 1.8 以前からアップグ ... とができるようになりました。詳しくは データベースを使ったセッションを拡張する を読んでください。 django.contrib.sites ¶ get_current_site() が新たに request.get_host() が domain:port という形式 (例: example.com:80 ) の値を返す場合でもハンドリングできるよう ... only the date portion. Added the Greatest and Least database functions. Added the Now database function, which returns the current date and time. Transform is now a subclass of Func() which allows Transform s to be used on the right hand side of an expr ... and bulk_create() . Request と Response ¶ Unless HttpResponse.reason_phrase is explicitly set, it now is determined by the current value of HttpResponse.status_code . Modifying the value of status_code outside of the constructor will also modify the val ...
https://man.mtool.work/django/6.1/releases/1.9.html
Django 1.9 リリースノート — Django 6.1 ドキュメント 7614
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.9 リリースノート ¶ December 1, 2015 Django 1.9 へようこそ! このリリースノートでは、 バージョン 1.9 の新機能 と、Django 1.8 以前からアップグ ... とができるようになりました。詳しくは データベースを使ったセッションを拡張する を読んでください。 django.contrib.sites ¶ get_current_site() が新たに request.get_host() が domain:port という形式 (例: example.com:80 ) の値を返す場合でもハンドリングできるよう ... only the date portion. Added the Greatest and Least database functions. Added the Now database function, which returns the current date and time. Transform is now a subclass of Func() which allows Transform s to be used on the right hand side of an expr ... and bulk_create() . Request と Response ¶ Unless HttpResponse.reason_phrase is explicitly set, it now is determined by the current value of HttpResponse.status_code . Modifying the value of status_code outside of the constructor will also modify the val ...
https://man.mtool.work/django/6.1/releases/1.9.html
Django 1.6.2 リリースノート — Django 6.1 ドキュメント 7230
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.6.2 リリースノート ¶ February 6, 2014 This is Django 1.6.2, a bugfix release for Django 1.6. Django 1.6.2 fixes several bugs in 1.6.1: Prev ... contained non-ASCII characters ( #21627 ). The collectstatic command will raise an error rather than default to using the current working directory if STATIC_ROOT is not set. Combined with the --clear option, the previous behavior could wipe anything b ... elow the current working directory ( #21581 ). Fixed mail encoding on Python 3.3.3+ ( #21093 ). Fixed an issue where when settings.DATABASE ... リリースノート 次のトピックへ Django 1.6.1 リリースノート 関連キーワード Fixed issue release geometry crash command default current working directory inheritance utils safe リリースノート February bugfix fixes several bugs Prevented base prepared garbage ...
https://man.mtool.work/django/6.1/releases/1.6.2.html
Django 1.6.2 リリースノート — Django 6.1 ドキュメント 7072
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.6.2 リリースノート ¶ February 6, 2014 This is Django 1.6.2, a bugfix release for Django 1.6. Django 1.6.2 fixes several bugs in 1.6.1: Prev ... contained non-ASCII characters ( #21627 ). The collectstatic command will raise an error rather than default to using the current working directory if STATIC_ROOT is not set. Combined with the --clear option, the previous behavior could wipe anything b ... elow the current working directory ( #21581 ). Fixed mail encoding on Python 3.3.3+ ( #21093 ). Fixed an issue where when settings.DATABASE ... 次のトピックへ Django 1.6.1 リリースノート 関連キーワード Django Fixed issue release geometry object crash command default current working directory inheritance django utils safe six リリースノート February bugfix 関連するページ Django 1.8.7 リリースノー ...
https://man.mtool.work/django/6.1/releases/1.6.2.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT