db.models.DateField

class DateField(auto_now=False, auto_now_add=False, **options) [source] A date, represented in Python by a datetime.date instance. Has a few extra, optional arguments:

db.models.CharField.max_length

CharField.max_length The maximum length (in characters) of the field. The max_length is enforced at the database level and in Django’s validation. Note If you are writing an application that must be portable to multiple database backends, you should be aware that there are restrictions on max_length for some backends. Refer to the database backend notes for details. MySQL users If you are using this field with MySQLdb 1.2.2 and the utf8_bin collation (which is not the default), there are

db.models.CharField

class CharField(max_length=None, **options) [source] A string field, for small- to large-sized strings. For large amounts of text, use TextField. The default form widget for this field is a TextInput. CharField has one extra required argument:

db.models.CommaSeparatedIntegerField

class CommaSeparatedIntegerField(max_length=None, **options) [source] Deprecated since version 1.9: This field is deprecated in favor of CharField with validators=[validate_comma_separated_integer_list]. A field of integers separated by commas. As in CharField, the max_length argument is required and the note about database portability mentioned there should be heeded.

db.models.CASCADE

CASCADE [source] Cascade deletes. Django emulates the behavior of the SQL constraint ON DELETE CASCADE and also deletes the object containing the ForeignKey.

db.models.BinaryField

class BinaryField(**options) [source] A field to store raw binary data. It only supports bytes assignment. Be aware that this field has limited functionality. For example, it is not possible to filter a queryset on a BinaryField value. It is also not possible to include a BinaryField in a ModelForm. Abusing BinaryField Although you might think about storing files in the database, consider that it is bad design in 99% of the cases. This field is not a replacement for proper static files hand

db.models.BooleanField

class BooleanField(**options) [source] A true/false field. The default form widget for this field is a CheckboxInput. If you need to accept null values then use NullBooleanField instead. The default value of BooleanField is None when Field.default isn’t defined.

db.models.BigAutoField

class BigAutoField(**options) [source] New in Django 1.10. A 64-bit integer, much like an AutoField except that it is guaranteed to fit numbers from 1 to 9223372036854775807.

db.models.BigIntegerField

class BigIntegerField(**options) [source] A 64-bit integer, much like an IntegerField except that it is guaranteed to fit numbers from -9223372036854775808 to 9223372036854775807. The default form widget for this field is a TextInput.

db.models.as_sql()

as_sql(self, compiler, connection) Responsible for producing the query string and parameters for the expression. The compiler is an SQLCompiler object, which has a compile() method that can be used to compile other expressions. The connection is the connection used to execute the query. Calling expression.as_sql() is usually incorrect - instead compiler.compile(expression) should be used. The compiler.compile() method will take care of calling vendor-specific methods of the expression. Custo