September 2019
Beginner to intermediate
494 pages
13h
English
In this section, we will implement our blog application as well as a Django model called Post, which contains the object-oriented logic for the posts in our blog:
manage.py@mysite > startapp blog
from django.db import modelsfrom django.utils import timezonefrom django.contrib.auth.models import Userclass Post(models.Model): STATUS_CHOICES = { ('draft', ...Read now
Unlock full access