per page, with , order by , clip by
Results of 1 - 10 of about 50 for lazy (0.008 sec.)
翻訳 15505
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... す。 Django ではこの方法に従っていませんが、それは以下の理由からです: 特定のファイルのデフォルトの翻訳メソッドとして gettext_lazy() を使うべき場合もあります。グローバル名前空間に _() がないと、開発者はどれが最も適切な翻訳関数かを考えなければなりません。 ... で使われる) xgettext が動作する方法のせいで、単一の文字列引数を持つ関数のみが _ として import できます。 gettext() gettext_lazy() この例では、 "Welcome to my site." というテキストが翻訳文字列としてマークされています: from django.http import HttpRespo ... h = pgettext ( "month name" , "May" ) もしくは: from django.db import models from django.utils.translation import pgettext_lazy class MyThing ( models . Model ): name = models . CharField ( help_text = pgettext_lazy ( "help text for MyThing model" , ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
Django ユーティリティ (django.utils) 13024
Django ユーティリティ ( django.utils ) このドキュメントは、 django.utils のすべての安定したモジュールを対象としています。 django.utils 内のほとんどのモジュールは内部使用を目的としていることから、 内部リリース非推奨ポリシー に従い、以下に記載 ... verts the result of a method with a single cls argument into a property that can be accessed directly from the class. keep_lazy ( func , * resultclasses ) [ソース] Djangoでは、文字列を最初の引数として受け取り、その文字列に何らかの処理を行う多くのユー ... 設定が正しくない可能性があります)、すぐに文字列に変換したくないでしょう。 このような場合には、 django.utils.functional.keep_lazy() デコレータを使用してください。これは、関数が引数の1つとして遅延評価される翻訳を持つ場合に、関数の評価を文字列に変換する必 ... 要があるまで遅らせるように変更します。 例: from django.utils.functional import keep_lazy , keep_lazy_text def fancy_utility_function ( s , * args , ** kwargs ): # Do some conversion on string 's' ... fancy_utili ...
https://man.mtool.work/django/6.1/ref/utils.html
テンプレートのバックエンドをカスタマイズする 9264
テンプレートのバックエンドをカスタマイズする カスタムのバックエンド ここでは、他のテンプレートシステムを使用するために、カスタムテンプレートバックエンドを実装する方法を説明します。テンプレートバックエンドは django.template.backends.base.Bas ... lateSyntaxError from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy , csrf_token_lazy import foobar class FooBar ( BaseEngine ): # Name of the subdirectory containing the templates for this ... text is None : context = {} if request is not None : context [ "request" ] = request context [ "csrf_input" ] = csrf_input_lazy ( request ) context [ "csrf_token" ] = csrf_token_lazy ( request ) return self . template . render ( context ) 詳しい情報は ...
https://man.mtool.work/django/6.1/howto/custom-template-backend.html
Django 3.0 リリースノート 8557
Django 3.0 リリースノート 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... for: urllib.parse.quote() , quote_plus() , unquote() , and unquote_plus() . django.utils.translation.ugettext() , ugettext_lazy() , ugettext_noop() , ungettext() , and ungettext_lazy() are deprecated in favor of the functions that they're aliases for ... : django.utils.translation.gettext() , gettext_lazy() , gettext_noop() , ngettext() , and ngettext_lazy() . To limit creation of sessions and hence favor some caching strateg ... pe_entities() is deprecated in favor of html.unescape() . Note that unlike unescape_entities() , html.unescape() evaluates lazy strings immediately. To avoid possible confusion as to effective scope, the private internal utility is_safe_url() is rena ...
https://man.mtool.work/django/6.1/releases/3.0.html
Django 1.9.3 リリースノート 8196
Django 1.9.3 リリースノート March 1, 2016 Django 1.9.3 fixes two security issues and several bugs in 1.9.2. CVE-2016-2512: Malicious redirect and possible XSS attack via user-supplied redirect URLs containing basic auth Django relies on use ... regression with an __in=qs lookup for a ForeignKey with to_field set ( #26196 ). forms.FileField および utils.translation.lazy_number() が pickle できるようになりました ( #26212 )。 None の値を持つ RangeField および ArrayField のシリアライズを修正し ... anager instances from sharing their cache ( #26286 ). Reverted a change in Django 1.9.2 ( #25858 ) that prevented relative lazy relationships defined on abstract models to be resolved according to their concrete model's app_label ( #26186 ). ...
https://man.mtool.work/django/6.1/releases/1.9.3.html
Django 1.9.7 リリースノート 8076
Django 1.9.7 リリースノート 2016年6月4日 Django 1.9.7 では、1.9.6 にあったいくつかのバグを修正しました。 バグ修正 Removed the need for the request context processor on the admin login page to fix a regression in 1.9 ( #26558 ). Fixed transl ... sword validators' help_text in forms ( #26544 ). Fixed a regression causing the cached template loader to crash when using lazy template names ( #26603 ). Fixed on_commit callbacks execution order when callbacks make transactions ( #26627 ). Fixed HS ...
https://man.mtool.work/django/6.1/releases/1.9.7.html
クラスベースのビューでフォームを扱う 8076
クラスベースのビューでフォームを扱う フォームの処理には、一般に3つの場合分けが存在します。 最初の GET リクエスト (空白またはデフォルト値が埋め込まれたフォームを返す) 無効なデータの POST リクエスト (よくあるパターンは、エラー表示を追加したフ ... スのビューのみを設定している点が重要です; 自分自身でロジックを書く必要はありません: views.py from django.urls import reverse_lazy from django.views.generic.edit import CreateView , DeleteView , UpdateView from myapp.models import Author class AuthorCre ... dateView ): model = Author fields = [ "name" ] class AuthorDeleteView ( DeleteView ): model = Author success_url = reverse_lazy ( "author-list" ) 注釈 ファイルがインポートされるときに urls は読み込まれないので、 reverse_lazy() を reverse() の代わりに ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-editing.html
Django 2.0.8 リリースノート 7971
Django 2.0.8 リリースノート 2018年8月1日 Django 2.0.8 では、2.0.7 にあった1つのセキュリティの問題と、いくつかのバグを修正しました。 CVE-2018-14574: CommonMiddleware に対するオープンリダイレクトの可能性 If the CommonMiddleware and the APPEND ... cially supported) ( #29544 ). Fixed a regression where django.template.Template crashed if the template_string argument is lazy ( #29617 ). ...
https://man.mtool.work/django/6.1/releases/2.0.8.html
Django 1.6.2 リリースノート 7850
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: Prevented the base geometry object of a prepared geometry to be garbage collected, which could lea ... ditions ( #21748 ). Oracle database introspection now works with boolean and float fields ( #19884 ). Fixed an issue where lazy objects weren't actually marked as safe when passed through mark_safe() and could end up being double-escaped ( #21882 ). ...
https://man.mtool.work/django/6.1/releases/1.6.2.html
Django 6.0.1 release notes 7730
Django 6.0.1 release notes January 6, 2026 Django 6.0.1 fixes one data loss bug introduced in Django 5.2 as well as several other bugs in Django 6.0. バグ修正 Fixed a bug in Django 5.2 where data exceeding max_length was silently truncated ... #36807 ). Fixed a crash in Django 6.0 caused by infinite recursion when calling repr() on an unevaluated django.utils.csp.LazyNonce instance ( #36810 ). Fixed a regression in Django 6.0 where path() routes defined using gettext_lazy() failed to reso ...
https://man.mtool.work/django/6.1/releases/6.0.1.html
PREV 1 2 3 4 5 NEXT