Order Blog Posts By Date - Django Blog #8

codemy(72)
Published in
#diy
Words
114
Reading
1 min
Listen
Play
6y

In this video we'll order our blog posts by date. We need to make a change to our Post Model to add a DateField and set it to auto implement whenever we add a new post.

We'll also need to make provisions for all the old posts that don't have a date listed. We can do that from the terminal whenever we make our migration.

We'll also need to import datetime into our models.py file.

✅ Watch The Entire Django Blog Playlist
https://bit.ly/3bWN6wj

✅ Subscribe To My YouTube Channel:
http://bit.ly/2IGzvOR

▶️ See More At:
https://Codemy.com

✅ Join My Facebook Group:
http://bit.ly/2GFmOBz

▶️ Learn to Code at https://Codemy.com
Take $22 off with coupon code: youtube

✅ Buy a Codemy T-Shirt!
http://bit.ly/2VC9WUN

Order Blog Posts By Date - Django Blog #8 | Ecency