per page, with , order by , clip by
Results of 1 - 10 of about 12 for country (0.007 sec.)
GeoIP2によるジオロケーション 13672
GeoIP2によるジオロケーション 概要 GeoIP2 オブジェクトは、 MaxMind geoip2 Python ライブラリ [ 1 ] のラッパーです。 IP ベースのジオロケーションを実行するために、 GeoIP2 オブジェクトには、バイナリ形式の GeoIP Country および City データセットと ... が必要です (CSV ファイルは使えません!)。これらは、例えば MaxMind や DB-IP のウェブサイトからダウンロードできます。 GeoLite2-Country.mmdb.gz および GeoLite2-City.mmdb.gz ファイルを取得し、これらを GEOIP_PATH 設定に対応するディレクトリに解凍してください。 ... すめします。 カスタマイズ例 以下はその使用例です: >>> 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 ... 4.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': ...
https://man.mtool.work/django/6.1/ref/contrib/gis/geoip2.html
組み込みテンプレートタグとフィルタ 11320
組み込みテンプレートタグとフィルタ このドキュメントでは、 Django の組み込みテンプレートタグとフィルタについて述べます。 また 自動ドキュメンテーション を使えばインストールされている組み込みタグとカスタムタグのドキュメントを読めるのでお勧めで ... ブジェクトのグループを作ります。 この複雑なタグは例を通して説明するのがいいでしょう: cities は "name" , "population" , and "country" をキーとして含むディクショナリによって表された都市のリストとします: cities = [ { "name" : "Mumbai" , "population" : "19,0 ... 00,000" , "country" : "India" }, { "name" : "Calcutta" , "population" : "15,000,000" , "country" : "India" }, { "name" : "New York" , "popula ... tion" : "20,000,000" , "country" : "USA" }, { "name" : "Chicago" , "population" : "7,000,000" , "country" : "USA" }, { "name" : "Tokyo" , "population" : " ...
https://man.mtool.work/django/6.1/ref/templates/builtins.html
マイグレーション・オペレーション 9533
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... ンファイルの Migration クラスから独立した別の関数として記述し、 RunPython に渡すことを推奨します。以下に RunPython を用いて Country モデル上の初期オブジェクトを追加する例を示します: from django.db import migrations def forwards_func ( apps , schema_edito ... r ): # We get the model from the versioned app registry; # if we directly import it, it'll be the wrong version Country = apps . get_model ( "myapp" , "Country" ) db_alias = schema_editor . connection . alias Country . objects . using ( db_al ... ias ) . bulk_create ( [ Country ( name = "USA" , code = "us" ), Country ( name = "France" , code = "fr" ), ] ) def reverse_func ( apps , schema_editor ): ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
アプリケーション 8507
アプリケーション Django には、設定の保存と調査の手段を提供するインストール済みアプリケーションのレジストリがあり、利用可能な モデル のリストもアクセスできます。 このレジストリは apps と呼ばれ、 django.apps で利用できます: >>> from django.ap ... 違いは、フォームフィールドの選択肢を入力するためにデータベースクエリを作成することです: class LocationForm ( forms . Form ): country = forms . ChoiceField ( choices = [ c . name for c in Country . objects . all ()]) 上の例では、 QuerySet がイテレートされる ... ため、 Country.objects.all() からのクエリがモジュールのインポート時に実行されます。警告を回避するには、代わりに ModelChoiceField を使用し ... ます: class LocationForm ( forms . Form ): country = forms . ModelChoiceField ( queryset = Country . objects . all ()) この警告を引き起こしたコードを見つけやすくするために、 ...
https://man.mtool.work/django/6.1/ref/applications.html
フォーム API 8065
フォーム API このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームについての概要 を読むことをおすすめします。 バインドされた (bound) フォームとバインドされていない ... 標に関する追加情報にアクセスしたい時は、次のように実装します。 class GPSCoordinatesBoundField ( BoundField ): @property def country ( self ): """ Return the country the coordinates lie in or None if it can't be determined. """ value = self . value () if ... value : return get_country_from_coordinates ( value ) else : return None class GPSCoordinatesField ( Field ): bound_field_class = GPSCoordinatesBound ... Field これで、テンプレート内で {{ form.coordinates.country }} を使って国にアクセスできるようになりました。 デフォルトのフォームフィールドのテンプレートレンダリングをカスタマイズした ...
https://man.mtool.work/django/6.1/ref/forms/api.html
索引 7941
索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ア | イ | ク | コ | シ | ス | テ | ハ | ヒ | フ | メ | モ | ロ | 具 | 国 | 環 | 翻 | 表 | 言 | 長 記号 -- dbshell コマン ... のクラス) Count (django.db.models のクラス) count (Paginator の属性) count() (django.db.models.query.QuerySet モジュール) country() (GeoIP2 のメソッド) country_code() (GeoIP2 のメソッド) country_name() (GeoIP2 のメソッド) coupling loose CovarPop (djang ... rib.gis.db.models.functions のクラス) GeoIP2 (django.contrib.gis.geoip2 のクラス) GeoIP2Exception GEOIP_CITY setting GEOIP_COUNTRY setting GEOIP_PATH setting geojson (GEOSGeometry の属性) geom (Feature の属性) geom_count (OGRGeometry の属性) geom_name ( ...
https://man.mtool.work/django/6.1/genindex.html
フォーム フィールド 7941
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... ield ): def __init__ ( self , ** kwargs ): # Define one message for all fields. error_messages = { "incomplete" : "Enter a country calling code and a phone number." , } # Or define a different message for each field. fields = ( CharField ( error_message ... s = { "incomplete" : "Enter a country calling code." }, validators = [ RegexValidator ( r "^[0-9]+$" , "Enter a valid country calling code." ), ], ), CharField ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
表示形式のローカライズ 7941
表示形式のローカライズ 概要 Django の表示形式システムは、カレント ロケール に合った表示形式を使って日付、時刻、数値をテンプレート内で表示することができます。また、フォームでのローカライズされた入力も処理します。 同じコンテンツにアクセスする ... ld () revenue = forms . DecimalField ( max_digits = 4 , decimal_places = 2 , localize = True ) Locale specific helpers For country specific form fields, validation, and data formats that are not included in Django itself, consider using the django-local ...
https://man.mtool.work/django/6.1/topics/i18n/formatting.html
Django 5.1 リリースノート 7818
Django 5.1 リリースノート 2024年8月7日 Django 5.1 へようこそ! このリリースノートでは、 バージョン 5.1 の新機能 と、Django 5.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... GeoIP2 が、 ipaddress.IPv4Address または ipaddress.IPv6Address オブジェクトを使用してクエリできるようになりました。 GeoIP2.country() が continent_code 、 continent_name 、 is_in_european_union の値を公開するようになりました。 GeoIP2.city() は、 accuracy ...
https://man.mtool.work/django/6.1/releases/5.1.html
組み込みのクラスベースのジェネリックビュー(汎用ビュー) 7818
組み込みのクラスベースのジェネリックビュー(汎用ビュー) ウェブアプリケーションを書くのは、特定のパターンを何度も繰り返すことになるため、単調になりがちです。Django はモデルとテンプレート層で単調さを取り除くことを試みてきましたが、ウェブ開発 ... ( max_length = 50 ) city = models . CharField ( max_length = 60 ) state_province = models . CharField ( max_length = 30 ) country = models . CharField ( max_length = 50 ) website = models . URLField () class Meta : ordering = [ "-name" ] def __str__ ( ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-display.html
PREV 1 2 NEXT