In the previous lesson, we have created our second model: projects model. But this time, you will create our third model in Django, blogs, on your own.

Previous Lesson: Lesson 32: Making Our Projects Model in Django

In the previous lesson, we have created our second model: projects model. But this time, you will create our third model in Django, blogs, on your own. Don’t worry. I have written down the steps here to help you create it:

  • Create blog model on models.py.
  • It should have the properties: title, publication date, image, excerpt (or summary), and body.
  • Add blog to settings.py.
  • Add blog to admin.py.
  • Make migration.
  • Migrate.

Note: Do not publish a blog post after you’ve created the Blogs model. We’ll publish blog posts together.

About the fields that you will use, just go back to this documentation: docs.djangoproject.com/en/3.0/ref/models/fields/:

About the fields that you will use, just go back to this documentation: docs.djangoproject.com/en/3.0/ref/models/fields/ on Lesson 33: You Create Our Blogs Model in Django.

And, if you have any questions, you are a little welcome to post them on the Comments section below, for now.

“Why do I have to do this?” I just said it–you will learn a lot. But, why will you learn a lot from this challenge? Because I know that all along, most of you guys were just typing and following along with me. And this lesson will stop you from doing so.

All in all, you’ll create this blogs model in Django without any trouble since we have reviewed back on our previous lesson.

Next Lesson: Lesson 34: How to Create the Blogs Model in Django

This article was written by Zeddrix Fabian

Zeddrix Fabian became one of Jehovah’s Witnesses on February 21, 2016, and started regular pioneering last March 2020. He wants to volunteer at Bethel⁠—that is his goal. After going to both private and public school for 10 years (Grade 1 to 8 in private; Grade 9 and 10 in public school), their family started trying homeschooling when he leveled up to Grade 11 this 2019. (Continue reading on ABOUT ZEDD menu)

Leave a Reply

Your email address will not be published. Required fields are marked *