appendix D Django ORM field reference
This appendix is a reference guide for Django’s built-in Database ORM fields. For a full reference, see the online documentation: https://docs.djangoproject.com/en/dev/ref/models/fields/.
D.1 Field options
Table D.1 contains the constructor arguments that can be used in all ORM field types.
Table D.1 Arguments common to all fields
Argument
|
Description
|
---|---|
null |
When True , empty values are stored in the database as NULL. |
blank |
When True , the value is allowed to be blank. Note: this is different from null , which is related to database storage. This field is used during field validation—for example, in the Django Admin. |
choices=[("en", "English"), ("fr", "French")] |
If present, this ... |
Get Django in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.