Python Querysets and Django Shell | Database Shell

Publié le: 15 septembre 2020
sur la chaîne: CodeWorld!
55
2

Github : https://github.com/ankurgla22/django-...
Tutorial: http://tech.bestguru.jp/django-drf-au...

Python Querysets and Django Shell | Database Shell

In this tutorial we will learn how to query the database.
We will use the django shell to query the database.
We will grab post that we already created, create new post and even delete some post so lets get started.

The django shell commands:
1. python3 manage.py shell
2. from api.models import Country
3. Country.objects.all()
4. Country.objects.create(name="Japan")
5. Country.objects.filter(name="Japan").delete()

Copyright © 2020 A. Tech Group. All Rights Reserved


Sur cette page du site, vous pouvez voir la vidéo en ligne Python Querysets and Django Shell | Database Shell durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur CodeWorld! 15 septembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 55 fois et il a aimé 2 téléspectateurs. Bon visionnage!