This is an educational platform for the students of Tai Solarin University of Education, Department of Physics for past question purpose.

100level

Ack! What is this?! It turns out we already have data in our database, our single Article, so we can't just willy-nilly add a new field on. Django is helpfully telling us that we either need to a one-off default of null or add it ourself. Hmmm. For this very reason, it is generally good advice to always add new fields with either null=True or with a default value. Let's take the easy approach of setting null=True for now. So type 2 on the command line. Then add this to our slug field. # articles/models.py from django.db import models from django.urls import reverse class Article(models.Model): title = models.CharField(max_length=255) body = models.TextField() slug = models.SlugField(null=True) # ne

daddy