-
這是一個必需的參數。
指定數組的基礎數據類型和行為。它應該是
Field
IntegerField
CharField
ForeignKey
OneToOneField
ManyToManyField
可以嵌套數組字段 - 您可以將
ArrayField
的實例指定為base_field
。例如:from django.contrib.postgres.fields import ArrayField from django.db import models class ChessBoard(models.Model): board = ArrayField( ArrayField( models.CharField(max_length=10, blank=True), size=8, ), size=8, )
數據庫和模型之間的值轉換、數據和配置的驗證以及序列化都委托給底層基礎字段。
本文介紹django.contrib.postgres.fields.ArrayField.base_field
的用法。
聲明
base_field
相關用法
- Python Django ArraySubquery用法及代碼示例
- Python Django ArrayAgg.ordering用法及代碼示例
- Python Django Area用法及代碼示例
- Python Django ArchiveIndexView用法及代碼示例
- Python Django Area.__getattr__用法及代碼示例
- Python Django Area.unit_attname用法及代碼示例
- Python Tweepy API.mentions_timeline()用法及代碼示例
- Python Tweepy API.get_user()用法及代碼示例
- Python Tweepy API.list_timeline()用法及代碼示例
- Python Django ACos用法及代碼示例
- Python Tweepy API.add_list_members()用法及代碼示例
- Python Django Abs用法及代碼示例
- Python Django AuthenticationForm.confirm_login_allowed用法及代碼示例
- Python Tweepy API.create_block()用法及代碼示例
- Python Django ATan用法及代碼示例
- Python Tweepy API.trends_closest()用法及代碼示例
- Python Tweepy API.send_direct_message()用法及代碼示例
- Python Tweepy API.destroy_status()用法及代碼示例
- Python Tweepy API.destroy_saved_search()用法及代碼示例
- Python Tweepy API.get_list()用法及代碼示例
- Python Tweepy API.favorites()用法及代碼示例
- Python Tweepy API.blocks_ids()用法及代碼示例
- Python Tweepy API.configuration()用法及代碼示例
- Python Tweepy API.lists_memberships()用法及代碼示例
- Python Tweepy API.home_timeline()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.contrib.postgres.fields.ArrayField.base_field。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。