Django Tutorial - Setup Admin Interface For Our Model

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hey Tom, first of all thank you again for the great Tutorial, actually I am using Django and it seems that is the ForeignKey we need to add the "on_delete"
Example: tutorial_series = models.ForeignKey(TutorialSeries, on_delete=models.CASCADE)

Just one question, when we run the "python manage.py makemigrations" why we have "Add field tutorial_series to lesson" as we are using the Foreign key for all the other tables?

Thank you

ahmedbenyahia
Автор

In OOP classes and methods. When we define a method into a class. We need to initiate an object and create an instance of that class, and then we can call a function into the class via an instance. (Bit always but mostly). The question here, how save function is called? Or is t called after the POST action?

WaelSalman
Автор

Must List_display named this way or we can name it whatever we want?, and if it is must so why?

WaelSalman