From c94272650915eef368cdc5d157644884c3eecccb Mon Sep 17 00:00:00 2001 From: Jens Alm Date: Mon, 15 Oct 2012 13:46:44 +0200 Subject: Added docs, integer fields and refactored models.TextField to use CharField I realized that per the django forms, there is no need for a separate TextField, an unlimited CharField is perfectly good. Also added default field for the different IntegerField types --- docs/api-guide/fields.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/api-guide') diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index df54ea02..dc9ab045 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -73,18 +73,35 @@ These fields represent basic datatypes, and support both reading and writing val ## BooleanField +A Boolean representation, corresponds to `django.db.models.fields.BooleanField`. + ## CharField +A text representation, optionally validates the text to be shorter than `max_length` and longer than `min_length`, corresponds to `django.db.models.fields.CharField` +or `django.db.models.fields.TextField`. + +**Signature:** `CharField([max_length=[, min_length=]])` + ## EmailField +A text representation, validates the text to be a valid e-mail adress. Corresponds to `django.db.models.fields.EmailField` + ## DateField +A date representation. Corresponds to `django.db.models.fields.DateField` + ## DateTimeField +A date and time representation. Corresponds to `django.db.models.fields.DateTimeField` + ## IntegerField +An integer representation. Corresponds to `django.db.models.fields.IntegerField`, `django.db.models.fields.SmallIntegerField`, `django.db.models.fields.PositiveIntegerField` and `django.db.models.fields.PositiveSmallIntegerField` + ## FloatField +A floating point representation. Corresponds to `django.db.models.fields.FloatField`. + --- # Relational Fields -- cgit v1.2.3