Image for post
Image for post

The first, you create a app in your project have name is Blog

Go to settings.py file and insert code in INSTALLED_APPS:

and now, you can create model in models.py file (belong to blog app):

and run cmd:

You just create a new file inside of this migrations folder.

ID field will get auto, so you dont need have to create it.

Awesome, if you want learn more, you can see documentations at here:

See you next part ✌️

Written by

Be Curious!| ☕️+✍🏼=❤️ | buihuycuong.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store