per page, with , order by , clip by
Results of 1 - 10 of about 55 for variable (0.011 sec.)
Coding style 12965
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... entation, comments, and docstrings should be wrapped at 79 characters. These limits are checked when flake8 is run. String variable interpolation may use %-formatting , f-strings , or str.format() as appropriate, with the goal of maximizing code readabil ... ity. Final judgments of readability are left to the Merger's discretion. As a guide, f-strings should use only plain variable and property access, with prior local variable assignment for more complex cases: # Allowed f "hello { user } " f "hello { ... user . name } " # Disallowed f "hello { get_user () } " f "you are { user . age * 365.25 } days old" # Allowed with local variable assignment user = get_user () f "hello { user } " user_days_old = user . age * 365.25 f "you are { user_days_old } days ol ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Django 1.8 リリースノート 12285
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... nSite.login_form . The base.html template has a new block usertools which contains the user-specific header. A new context variable has_permission , which gets its value from has_permission() , indicates whether the user may access the site. Foreign key ... nd() , the option name can match the command line option name (without the initial dashes) or the final option destination variable name, but in either case, the resulting option received by the command is now always the dest name specified in the comman ... querysets across different versions of Django isn't officially supported (it may work, but there's no guarantee). An extra variable that specifies the current Django version is now added to the pickled state of models and querysets, and Django raises a R ...
https://man.mtool.work/django/6.1/releases/1.8.html
Python プログラマーのための Django テンプレート言語 10718
Python プログラマーのための Django テンプレート言語 この文書は Django テンプレートシステムがどのように動作し、どのように拡張するか、技術的な観点から説明します。構文に関するリファレンスを探しているなら、 Django テンプレート言語 を参照してくだ ... としない変数よりも少し複雑です。以下に注意すべき点を示します: この変数が呼び出されたときに例外が発生した場合、例外が silent_variable_failure 属性の値が True でない限り、例外は伝播します。例外に silent_variable_failure 属性があり、その値が True である場合、 ... p })) Traceback (most recent call last): ... AssertionError : foo >>> class SilentAssertionError ( Exception ): ... silent_variable_failure = True ... >>> class PersonClass4 : ... def first_name ( self ): ... raise SilentAssertionError ... >>> p = Person ... go.core.exceptions.ObjectDoesNotExist はすべての Django データベース API の DoesNotExist 例外用の基本クラスですが、 silent_variable_failure = True を持っていることに注意してください。そのため、 Django モデルオブジェクトで Django テンプレートを使っている場 ...
https://man.mtool.work/django/6.1/ref/templates/api.html
Django 3.2.1 リリースノート 9372
Django 3.2.1 リリースノート May 4, 2021 Django 3.2.1 fixes a security issue and several bugs in 3.2. CVE-2021-31542: Potential directory-traversal via uploaded files MultiPartParser , UploadedFile , and FieldFile allowed directory-traversal ... ModelAdmin.search_fields when searching against phrases with unbalanced quotes ( #32649 ). Fixed a bug in Django 3.2 where variable lookup errors were logged rendering the sitemap template if alternates were not defined ( #32648 ). Fixed a regression in ... .2, due to a separate fix using Exists to exclude() multi-valued relationships ( #32650 ). Fixed a bug in Django 3.2 where variable lookup errors were logged when rendering some admin templates ( #32681 ). Fixed a bug in Django 3.2 where an admin changel ...
https://man.mtool.work/django/6.1/releases/3.2.1.html
How to use Django's Content Security Policy 9151
How to use Django's Content Security Policy Basic config Content Security Policy (CSP) を有効にするには、Django プロジェクトで次のように設定します: Add the CSP middleware to your MIDDLEWARE setting: MIDDLEWARE = [ # ... "django.middleware.c ... to your TEMPLATES setting. This makes the generated nonce value available in the Django templates as the csp_nonce context variable: TEMPLATES = [ { "BACKEND" : "django.template.backends.django.DjangoTemplates" , "OPTIONS" : { "context_processors" : [ # ... your templates, add the nonce to elements that require it: For inline <style> or <script> tags, use the csp_nonce context variable directly: < style nonce = " {{ csp_nonce }} " > /* These inline styles will be allowed. */ </ style > < script nonce = " { ...
https://man.mtool.work/django/6.1/howto/csp.html
Django 1.11.18 リリースノート 8929
Django 1.11.18 リリースノート January 4, 2019 Django 1.11.18 fixes a security issue in 1.11.17. CVE-2019-3498: Content spoofing possibility in the default 404 page An attacker could craft a malicious URL that could make spoofed content appe ... faults.page_not_found() view. The URL path is no longer displayed in the default 404 template and the request_path context variable is now quoted to fix the issue for custom templates that use the path. ...
https://man.mtool.work/django/6.1/releases/1.11.18.html
独自のテンプレートタグとフィルタを作る 8707
独自のテンプレートタグとフィルタを作る Django のテンプレート言語は、アプリケーションのプレゼンテーションロジックのニーズに対応するように設計された、多種多様な 埋め込みタグやフィルタ を搭載しています。それでもなお、テンプレート構成要素のコア ... from the given string""" return value . replace ( arg , "" ) そして、以下はフィルタがどのように使われるかの例です: {{ somevariable | cut :"0" }} ほとんどのフィルタは引数を取りません。この場合、次のように関数の第2引数を省略してください: def lower ( value ... .template.TemplateSyntaxError を親切なメッセージとともに発生させます。 The TemplateSyntaxError exceptions use the tag_name variable. Don't hardcode the tag's name in your error messages, because that couples the tag's name to your function. token.content ... retrieve the actual contents of the date_updated property of the blog_entry object. This can be accomplished by using the Variable() class in django.template . Variable クラスを使うには、クラスを解決されるべき変数名でインスタンス化した後に、 variable.re ...
https://man.mtool.work/django/6.1/howto/custom-template-tags.html
組み込みテンプレートタグとフィルタ 8707
組み込みテンプレートタグとフィルタ このドキュメントでは、 Django の組み込みテンプレートタグとフィルタについて述べます。 また 自動ドキュメンテーション を使えばインストールされている組み込みタグとカスタムタグのドキュメントを読めるのでお勧めで ... 交互に値を変更できます: {% for o in some_list %} < tr class = " {% cycle rowvalue1 rowvalue2 %} " > ... </ tr > {% endfor %} Variables included in the cycle will be escaped. You can disable auto-escaping with: {% for o in some_list %} < tr class = " {% aut ... す: {% extends "base.html" %} (引用符つき) の場合、リテラル値 "base.html" を親テンプレートの名前として使います。 {% extends variable %} とした場合、変数 variable の値を親テンプレートの名前として使います。変数の値が文字列の場合、 Django はその文字列を親テン ... orloop.parentloop 入れ子のループであるとき、現在のループを囲んでいる 1 つ上のループを表します。 Changed in Django 6.0: The variable forloop.length was added. for ... empty for タグのオプションとして {% empty %} 節を使うこともできます。これはループさせよう ...
https://man.mtool.work/django/6.1/ref/templates/builtins.html
Django 1.4.7 リリースノート 8707
Django 1.4.7 リリースノート September 10, 2013 Django 1.4.7 fixes one security issue present in previous Django releases in the 1.4 series. Directory traversal vulnerability in ssi template tag In previous versions of Django it was possible ... actice this is not a very common problem, as it would require the template author to put the ssi file in a user-controlled variable, but it's possible in principle. ...
https://man.mtool.work/django/6.1/releases/1.4.7.html
Django 1.5 リリースノート 8249
Django 1.5 リリースノート February 26, 2013 Django 1.5 へようこそ! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 1.4 or older versions. We'v ... ke {% url myview %} was interpreted incorrectly (Django considered "myview" to be a literal name of a view, not a template variable named myview ). Django 1.3 and above introduced the {% load url from future %} syntax to bring in the corrected behavior w ... here myview was seen as a variable. The upshot of this is that if you are not using {% load url from future %} in your templates, you'll need to change tags ... By passing False using this argument it is now possible to retrieve the ContentType associated with proxy models. New view variable in class-based views context In all generic class-based views (or any class-based view inheriting from ContextMixin ), the ...
https://man.mtool.work/django/6.1/releases/1.5.html
PREV 1 2 3 4 5 6 NEXT