Django ORM - Select and Output individual fields example

preview_player
Показать описание
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at how to select individual fields from a database and output the data onto a template.

00:00 Introduction

Code Repository 6

✨ Support us - join us as a very academy member

👍SUBSCRIBE to get more free tutorials, courses and code snippets!

👍👍Follow us on Facebook

👍👍👍Follow use on Twitter:
Рекомендации по теме
Комментарии
Автор

This is a great series. It's great to slow down and focus on one aspect of Django.

julienboudreau
Автор

Use have solved my biggest problem of working with database in django. Please Make Videos on other methods(like select_related, exclude) also.

nucleusnode
Автор

Why does the select statement in 7:10 still contains all the fields even though only() is used?

jiweihe
Автор

Can we see a video on select_related and prefetch_related.?

createlifejr
Автор

It is interesting. If I select only the firstname and the age it is also possible to display the surename and the classroom. The SQL querie ('sql': 'SELECT "student_student"."id", "student_student"."firstname", "student_student"."age" FROM "student_student" WHERE "student_student"."classroom" = 1)

calls only the firstname and age but its seems to take the whole instance ...
So what does the ".only()" do?

user
Автор

How can I sort the posts of one user, for example, I only want to display the posts of a user who uploaded them on his own account, like the technology in Facebook, that is, when I upload a post, I can see it on my own page, I want to do something similar to that But I haven't succeeded yet

ZZ-vzin
Автор

students = also gives last name as well.

mr.anderson