per page, with , order by , clip by
Results of 1 - 10 of about 141 for Code (0.007 sec.)
JavaScript code 10858
JavaScript code While most of Django core is Python, the admin and gis contrib apps contain JavaScript code. Please follow these coding standards when writing JavaScript code for inclusion in Django. Code style Please conform to the indenta ... ns. When naming variables, use camelCase instead of underscore_case . Different JavaScript files sometimes use a different code style. Please try to conform to the code style of each file. Use the Biome code linter to check your code for bugs and sty ... l be run by the pre-commit hooks. We also recommended installing a Biome plugin in your text editor. Where possible, write code that will work even if the page structure is later changed with JavaScript. For instance, when binding a click handler, us ... e. Testing from a web browser To run the tests from a web browser, open up js_tests/tests.html in your browser. To measure code coverage when running the tests, you need to view that file over HTTP. To view code coverage: ルートディレクトリで python ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/javascript...
Djangoソースコードレポジトリ 10799
Djangoソースコードレポジトリ Djangoアプリケーションを本番環境にデプロイするときは、 公式パッケージのDjangoリリース をほぼ常に使いたくなるでしょう。 しかし、次期リリースの開発中のコードを試したり、Djangoの開発に貢献したい場合は、Djangoのソー ... このドキュメントはコードレポジトリの構成とそこでの作業方法と調査方法について説明しています。 大局的な概要 The Django source code repository uses Git to track changes to the code over time, so you'll need a copy of the Git client (a program called git ... s of documentation . The Django Git repository is located online at github.com/django/django . It contains the full source code for all Django releases, which you can browse online. The Git repository includes several branches : main contains the mai ... n in-development code which will become the next packaged release of Django. This is where most development activity is focused. stable/A.B.x ar ...
https://man.mtool.work/django/6.1/internals/git.html
Coding style 10240
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 ... view. By checking for these issues before code review it allows the reviewer to focus on the change itself, and it can also help to reduce the number of CI runs. To use ... s that we don't consider as gross violations. Remember that PEP 8 is only a guide, so respect the style of the surrounding code as a primary goal. An exception to PEP 8 is our rules on line lengths. We allow up to 88 characters in code, as this is th ... ring variable interpolation may use %-formatting , f-strings , or str.format() as appropriate, with the goal of maximizing code readability. Final judgments of readability are left to the Merger's discretion. As a guide, f-strings should use only pla ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
バリデータ (Validator) 9300
バリデータ (Validator) バリデータを記述する バリデータ (validator) は呼び出し可能なオブジェクトで、値を受け取り、ある基準を満たしていない場合に ValidationError を発生させます。バリデータは異なるタイプのフィールド間でバリデーションロジックを ... field.clean() メソッドの代わりに使うことも可能です。 RegexValidator class RegexValidator ( regex = None , message = None , code = None , inverse_match = None , flags = 0 ) [ソース] パラメータ : regex -- None 以外の場合、 regex をオーバーライドします。 ... 正規表現の文字列か、コンパイル済みの正規表現を指定します。 message -- None 以外の場合、 message をオーバーライドします。 code -- None 以外の場合、 code をオーバーライドします。 inverse_match -- None 以外の場合、 inverse_match をオーバーライドする。 ... は、与えられた value を指定された正規表現で re.search() で検索します。デフォルトでは、一致が 見つからない 場合に message と code を持つ ValidationError を発生させます。 inverse_match を True に設定することで、動作を逆にできます。この場合、一致が 見つか ...
https://man.mtool.work/django/6.1/ref/validators.html
Django 1.2 リリースノート 9300
Django 1.2 リリースノート 2010 年 5 月 17 日 Django 1.2 へようこそ! Nearly a year in the making, Django 1.2 packs an impressive list of new features and lots of bug fixes. These release notes cover the new features, as well as important cha ... omewhat; authors of custom template tags that need to store state (e.g. custom control flow tags) should ensure that their code follows the new rules for stateful template tags The user_passes_test() , login_required() , and permission_required() , d ... developed your own custom template loaders we suggest to consider porting them to a class-based implementation because the code for backwards compatibility with function-based loaders starts its deprecation process in Django 1.2 and will be removed i ... scription of the API these loader classes must implement in the template API reference and you can also examine the source code of the loaders shipped with Django. Natural keys in fixtures Fixtures can now refer to remote objects using ナチュラルキー ...
https://man.mtool.work/django/6.1/releases/1.2.html
Submitting contributions 8991
Submitting contributions We're always grateful for contributions to Django's code. Indeed, bug reports with associated contributions will get fixed far more quickly than those without a solution. Typo fixes and trivial documentation changes ... nger monopolized and somebody else can claim it. If you've claimed a ticket and it's taking a long time (days or weeks) to code, keep everybody updated by posting comments on the ticket. If you don't provide regular updates, and you don't respond to ... changes ready. Contribution style Make sure that any contribution you do fulfills at least the following requirements: The code required to fix a problem or add a feature is an essential part of a solution, but it is not the only part. A good fix sho ... clude a regression test to validate the behavior that has been fixed and to prevent the problem from arising again. If the code adds a new feature, or modifies the behavior of an existing feature, the change should also contain documentation. When yo ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/submitting...
Porting your apps from Django 0.96 to 1.0 8360
Porting your apps from Django 0.96 to 1.0 Django 1.0 breaks compatibility with 0.96 in some areas. This guide will help you port 0.96 projects and apps to 1.0. The first part of this document includes the common changes needed to run with 1 ... .0. If after going through the first part your code still breaks, check the section Less-common Changes for a list of a bunch of less-common compatibility issues. 参考 1.0 リ ... ています。 Common changes This section describes the changes between 0.96 and 1.0 that most users will need to make. Use Unicode Change string literals ( 'foo' ) into Unicode literals ( u'foo' ). Django now uses Unicode strings throughout. In most pla ... ces, raw strings will continue to work, but updating to use Unicode literals will prevent some obscure problems. See Unicode データ for full details. モデル Common changes to your models fil ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
翻訳 8360
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... ライブラリが gettext_lazy オブジェクトを処理しないので、以下は動作しません: body = gettext_lazy ( "I \u2764 Django" ) # (Unicode :heart:) requests . post ( "https://example.com/send" , data = { "body" : body }) gettext_lazy() オブジェクトを非 Django コ ... 、次のようにします: lazy_string = to_lower_lazy ( _ ( "My STRING!" )) 言語のローカライズされた名前 get_language_info ( lang_code ) [ソース] get_language_info() 関数は、言語について詳細な情報を提供します: >>> from django.utils.translation import activa ... トの中で言語を選択したい場合、 language テンプレートタグが使用できます: {% load i18n %} {% get_current_language as LANGUAGE_CODE %} <!-- Current language: {{ LANGUAGE_CODE }} --> < p > {% translate "Welcome to our page" %} </ p > {% language 'en' %} { ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
Contributing code 8241
Contributing code So you'd like to write some code, documentation or tests to improve Django? There are several ways you can help Django's development. Tutorials The Django tutorial contains a whole section that walks you step-by-step throu ... gh the contributing code process. Djangoにはじめて貢献する How-to ガイド If you already have some familiarity with the processes and principles, ou ... t and GitHub Related topics It's important to understand how we work and the conventions we adopt. Coding style JavaScript code アクセシビリティ コードのコミット We maintain a curated list of small issues suited to first-time or less experienced cont ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/
GeoIP2によるジオロケーション 8111
GeoIP2によるジオロケーション 概要 GeoIP2 オブジェクトは、 MaxMind geoip2 Python ライブラリ [ 1 ] のラッパーです。 IP ベースのジオロケーションを実行するために、 GeoIP2 オブジェクトには、バイナリ形式の GeoIP Country および City データセットと ... 使用例です: >>> from django.contrib.gis.geoip2 import GeoIP2 >>> g = GeoIP2 () >>> g . country ( "google.com" ) {'continent_code': 'NA', 'continent_name': 'North America', 'country_code': 'US', 'country_name': 'United States', 'is_in_european_union': ... False} >>> g . city ( "72.14.207.99" ) {'accuracy_radius': 1000, 'city': 'Mountain View', 'continent_code': 'NA', 'continent_name': 'North America', 'country_code': 'US', 'country_name': 'United States', 'is_in_european_union': ... False, 'latitude': 37.419200897216797, 'longitude': -122.05740356445312, 'metro_code': 807, 'postal_code': '94043', 'region_code': 'CA', 'region_name': 'California', 'time_zone': 'America/Los_Angeles', 'dma_ ...
https://man.mtool.work/django/6.1/ref/contrib/gis/geoip2.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT