Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Django ORM - Updating and Deleting QuerySets / ForeignKey on_delete behaviour в хорошем качестве

Django ORM - Updating and Deleting QuerySets / ForeignKey on_delete behaviour 1 год назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Django ORM - Updating and Deleting QuerySets / ForeignKey on_delete behaviour

In this video, we look at how to update and delete models and querysets in Django. For UPDATES, we'll look at updating an individual model (representing a DB row), and will see how to use the "update_fields" argument to the model save() method. We'll also look at the Django ModelState object's "adding" property. Finally, we'll see how to update an entire QuerySet, and set a value across that QuerySet. For DELETES, we'll see how to delete individual models, as well as entire QuerySets of models. We'll also look at how the ForeignKey on_delete argument works during deletes, paying particular attention to the models.CASCADE and models.SET_NULL options. 📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀: 00:00 Intro 00:48 Updating Django model instances 03:18 Passing updated fields to model save() method with update_fields argument 03:52 Checking whether model is added or updated in model save() method 06:59 Updating a QuerySet of records with queryset update() method 09:36 Filtering QuerySet with a startswith lookup in Django 15:22 Deleting model instances with model delete() function 16:17 Effect of CASCADE on_delete parameter on foreign key 20:20 Effect of SET_NULL on_delete parameter for foreign keys 21:34 Django QuerySet delete() method to remove multiple objects ☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes ▶️ Full Playlist:    • Django ORM Deep Dive   𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮: 📖 Blog: https://bugbytes.io/posts/ 👾 Github: https://github.com/bugbytes-io/ 📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻: Django Model instance reference: https://docs.djangoproject.com/en/4.2... Updating Multiple Records: https://docs.djangoproject.com/en/4.2... Django Field Lookups: https://docs.djangoproject.com/en/4.2... #python #django #webdevelopment #database #sql

Comments