■ Zeichenkette Char
title = models.CharField(max_length=200)
■ Zeichenkettentext
body = models.TextField()
■ DateTime & Anfangswerteinstellung
pub_date = models.DateTimeField('date published',default=datetime.datetime.now() )
■ Int & Listenauswahl
CategoryChoices = (
(1, 'DESIGN'),
(2, 'TECH'),
(3, 'ENTERTAINMENT'),
(4, 'SOCIAL'),
(5, 'BUSINESS'),
(6, 'TRAVEL'),
)
category = models.IntegerField(choices=CategoryChoices)
Recommended Posts