Python Django Tutorial #4: Django Models, Django ORM, database migrations | Django blog project

preview_player
Показать описание
This Python Django Tutorial is about using Django Models to store user's data in databases with Django ORM. This video also is about Django database migrations.

Database migrations is a mechanism that allows us to roll back changes that we made to a database scheme. Database migrations in Django is something like Git for databases.

Our first Django Models is a Post model. A master of our Django blog will want to create a new blog post. And so we have to store the Blog's post data in a database.

To do it we have describe a Django model - a Post, that will represent our posts in a database. We have to describe fields of Django models that will become records in databases.

Django ORM allows us to describe a database scheme by creating Python classes.
After we'll create Django models we have to make migrations for these changes. Django migrations files - are Python files, that contain instructions what changes should be committed to a database.

We can create Django migration files with the command:

After that we have to apply our migrations to a database:

Follow me @:

============ SOURCE CODE ================
📎️ The SOURCE CODE is available via Patreon:
======================================

✴️✴️✴️ Web Scraping course ✴️✴️✴️
is available via Patreon here:

or its landing:

➥ Please ➥ Like ➥ Comment ➥ Subscribe

▶️ This Django blog tutorial. List of videos:

#0. Demo

#1. Django Project Structure

#2. Routing and Handling requests

#3. Template Inheritance

#4. Django Models, Django ORM, Django database migrations (posts)

#5. Tag Model and ManyToMany Relationships

#6. Class Based Views and using Mixins

#7. Django Forms. Creating Tags.

#8. Forms. Creating Posts

#9. Updating via Forms

#10. Deleting via Forms

#11. Using custom CSS

#12. Restricting access

#13. Django Pagination

#14. Django Basic Search

✴️✴️✴️ PLAYLISTS ✴️✴️✴️

🔹Django Tutorial: Blog Engine

🔹Kivy Tutorial: Coppa Project

🔹Telegram Bot with Python (CoinMarketCap)

🔹Python Web Scraping

➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Red Eyed Coder Club is the best place to learn Python programming and Django:

Python Django Tutorial #4: Django Models, Django ORM, database migrations | Django Crash Course:

#django #djangomodels #redeyedcoderclub
Рекомендации по теме
Комментарии
Автор

What video should I make next? Any suggestions? *Write me in comments!*
Follow me @:

Help the channel grow! Please Like the video, Comment, SHARE & Subscribe!

RedEyedCoderClub
Автор

The best interpretation of the blog django project out there. RedEyedCoderClub should have many many more likes!!

Feindsenda
Автор

this now this is one of the best tutorial I had seen on Django, still thinking why u had so less view as your content is legendary

naveenkumardongre
Автор

This is far better than the $10 udemy courses.

pranjal
Автор

Can we make seperate apps like payment, accounts like that and interconnected with each other in django

anojamadusanka