Created
May 2, 2019 21:52
-
-
Save valerybriz/efb79a1571bba2f398e6e72e51f82dae to your computer and use it in GitHub Desktop.
Create the query filtering users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the query filtering users with email [email protected] | |
users = User.objects.get(email="[email protected]") | |
users.name # Hit the database and retrieve the name value | |
users.name # cached version, no database access |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment