per page, with , order by , clip by
Results of 1 - 10 of about 98 for meta (0.008 sec.)
モデル 13015
モデル モデルは、データに関する唯一かつ決定的な情報源です。あなたが保持するデータが必要とするフィールドとその動作を定義します。一般的に、各モデルは単一のデータベースのテーブルに対応付けられます。 基本: モデルは各々 Python のクラスであり dja ... ( 30 ) NOT NULL ); 技術的な注意点: By default, the name of the table ( myapp_person ) is automatically derived from model metadata, combining the name of the app ( myapp ) and the lowercase name of the model ( person ). See テーブル名 for more detai ... lete = models . CASCADE ) date_joined = models . DateField () invite_reason = models . CharField ( max_length = 64 ) class Meta : constraints = [ models . UniqueConstraint ( fields = [ "person" , "group" ], name = "unique_person_group" ) ] 中間モデル ... ィールドクラスを作成できます。自分自身のフィールドを作成する方法は、 カスタムのモデルフィールドを作成する で提供しています。 Meta オプション 内側に class Meta というクラスを定義することで、モデルのメタデータを設定できます。 from django.db import models ...
https://man.mtool.work/django/6.1/topics/db/models.html
モデルからフォームを作成する 11773
モデルからフォームを作成する ModelForm class ModelForm [ソース] データベース中心のアプリケーションを作成している場合、Django モデルに密接にマップするフォームを使うことになるでしょう。例えば、 BlogComment モデルを持っていて、閲覧者がコメント ... ort ModelForm >>> from myapp.models import Article # Create the form class. >>> class ArticleForm ( ModelForm ): ... class Meta : ... model = Article ... fields = [ "pub_date" , "headline" , "content" , "reporter" ] ... # Creating a form to add an ar ... odels . CharField ( max_length = 100 ) authors = models . ManyToManyField ( Author ) class AuthorForm ( ModelForm ): class Meta : model = Author fields = [ "name" , "title" , "birth_date" ] class BookForm ( ModelForm ): class Meta : model = Book fiel ... essages についての注意 Error messages defined at the form field level ( django.forms.Field.error_messages ) or at the form Meta level always take precedence over the error messages defined at the model field level ( django.db.models.Field.error_messa ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
モデル _meta API 11015
モデル _meta API class Options [ソース] モデルの _meta API は、Django ORM のコアにあります。これにより、ルックアップ、クエリ、フォーム、admin などのシステムの他のパーツは、各モデルの機能を理解できるようになります。API は、各モデルクラスの _ ... は、 FieldDoesNotExist 例外が発生します。 >>> from django.contrib.auth.models import User # A field on the model >>> User . _meta . get_field ( "username" ) <django.db.models.fields.CharField: username> # A field from another model that has a relation ... with the current model >>> User . _meta . get_field ( "logentry" ) <ManyToOneRel: admin.logentry> # A non existent field >>> User . _meta . get_field ( "does_not_ ... to True , get_fields() will include fields with hidden=True . >>> from django.contrib.auth.models import User >>> User . _meta . get_fields () (<ManyToOneRel: admin.logentry>, <django.db.models.fields.AutoField: id>, <django.db.models.fields.CharFie ...
https://man.mtool.work/django/6.1/ref/models/meta.html
REMOTE_USER で認証する 8833
REMOTE_USER で認証する This document describes how to make use of external authentication sources in your Django applications. This type of authentication solution is typically seen on intranet sites, with single sign-on solutions such as I ... ntication it typically provides the authenticated user as REMOTE_USER . In Django, this value is made available in request.META (as REMOTE_USER when supplied as an environment variable, as in WSGI, or HTTP_REMOTE_USER when supplied via an HTTP header ... ngo.contrib.auth.backends.RemoteUserBackend" , ] With this setup, RemoteUserMiddleware will detect the username in request.META['REMOTE_USER'] (or request.META['HTTP_REMOTE_USER'] under ASGI) and will authenticate and auto-login that user using the R ... TTP header and not REMOTE_USER , you can subclass RemoteUserMiddleware and set the header attribute to the desired request.META key. For example: mysite/middleware.py from django.contrib.auth.middleware import RemoteUserMiddleware class CustomHeaderR ...
https://man.mtool.work/django/6.1/howto/auth-remote-user.html
Django 1.10.1 リリースノート 8833
Django 1.10.1 リリースノート September 1, 2016 Django 1.10.1 fixes several bugs in 1.10. バグ修正 Fixed a crash in MySQL connections where SELECT @@SQL_AUTO_IS_NULL doesn't return a result ( #26991 ). Allowed User.is_authenticated and User. ... broken BaseCommand.usage() method which was for optparse support ( #27000 ). Fixed a checks framework crash with an empty Meta.default_permissions ( #26997 ). Fixed a regression in the number of queries when using RadioSelect with a ModelChoiceField ... form field ( #27001 ). Fixed a crash if request.META['CONTENT_LENGTH'] is an empty string ( #27005 ). Fixed the isnull lookup on a ForeignKey with its to_field pointing to a C ... t in use or if no apps can be migrated to the database ( #27054 , #27110 , #27142 ). Removed duplicated managers in Model._meta.managers ( #27073 ). Fixed contrib.admindocs crash when a view is in a class, such as some of the admin views ( #27018 ). ...
https://man.mtool.work/django/6.1/releases/1.10.1.html
モデルフォーム 8742
モデルフォーム ModelForm API リファレンス。 ModelForm の使用に関する入門的な資料は、トピックガイドの モデルからフォームを作成する を参照してください。 モデルフォームの Meta API class ModelFormOptions [ソース] The _meta API is used to build ... forms that reflect a Django model. It is accessible through the _meta attribute of each model form, and is a django.forms.models.ModelFormOptions instance. 生成されるフォームの構造は、内部の M ... す。以下がその例です。 from django.forms import ModelForm from myapp.models import Book class BookForm ( ModelForm ): class Meta : model = Book fields = [ "title" , "author" ] help_texts = { "title" : "The title of the book" , "author" : "The author o ... the book" , } # ... other attributes 必要な属性は、まず model と、それから fields または exclude のいずれかです。その他の Meta 属性の設定は任意です。 localized_fields と formfield_callback を除く設定任意の属性には、モデルフィールド名をキーとしてそれ ...
https://man.mtool.work/django/6.1/ref/forms/models.html
モデルの Meta オプション 8742
モデルの Meta オプション このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 利用可能な Meta オプション abstract Options. abstract abstract = True の場合、このモデルは 抽象 ... p_label = "myapp" モデルを app_label.object_name または app_label.model_name という形式で表現したい場合は、それぞれ model._meta.label または model._meta.label_lower を使用します。 base_manager_name Options. base_manager_name モデルの _base_manager に ... 義されたモデルは bookstore_book という名前のデータベーステーブルを持ちます。 データベーステーブル名を上書きするには、 class Meta の db_table パラメータを使用します。 データベースのテーブル名が SQL の予約語だったり、 Python の変数名では許されない文字( ... . Model ): question = models . ForeignKey ( Question , on_delete = models . CASCADE ) answer = models . TextField () class Meta : db_table_comment = "Question answers" db_tablespace Options. db_tablespace このモデルに使用する データベーステーブル空間 ...
https://man.mtool.work/django/6.1/ref/models/options.html
Django 1.8 リリースノート 8454
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... or Python 3.2 in February 2016, we won't test Django 1.8.x on Python 3.2 after the end of 2016. Django 1.8 の新機能 Model._meta API Django now has a formalized API for Model._meta , providing an officially supported way to retrieve fields and filter ... fields based on their attributes . The Model._meta object has been part of Django since the days of pre-0.96 "Magic Removal" -- it just wasn't an official, stable API. In re ... tes when the database version is 3.0 or later. The PostGIS 2 CREATE EXTENSION postgis and the SpatiaLite SELECT InitSpatialMetaData initialization commands are now automatically run by migrate . The GDAL interface now supports retrieving properties o ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 1.6 リリースノート 8258
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... るには、 最初に PIL をアンインストールして、 その後 Pillow をインストールする必要があります。 ModelForm accepts several new Meta options. Fields included in the localized_fields list will be localized (by setting localize on the form field). The label ... efined the _has_changed method on a widget, you should now define this method on the form field itself. module_name model _meta attribute Model._meta.module_name was renamed to model_name . Despite being a private API, it will go through a regular de ... precation path. get_(add|change|delete)_permission model _meta methods Model._meta.get_(add|change|delete)_permission methods were deprecated. Even if they were not part of the public A ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django 2.0 リリースノート 8258
Django 2.0 リリースノート December 2, 2017 Django 2.0 へようこそ! このリリースノートでは、 バージョン 2.0 の新機能 と、Django 1.11 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... m GeoJSON now has its SRID set. Added the OSMWidget.default_zoom attribute to customize the map's default zoom level. Made metadata readable and editable on rasters through the metadata , info , and metadata attributes. Allowed passing driver-specifi ... it controls the number of results Django fetches from the database adapter. QuerySet.earliest() , QuerySet.latest() , and Meta.get_latest_by now allow ordering by several fields. Added the ExtractQuarter function to extract the quarter from DateFiel ... adding different conditionals to multiple aggregations over the same fields or relations. Added support for expressions in Meta.ordering . The new named parameter of QuerySet.values_list() allows fetching results as named tuples. The new FilteredRela ...
https://man.mtool.work/django/6.1/releases/2.0.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT