Django ORM: Accessing a Single Project
To get started, go into the Django shell and bring up
models.py so you can have an overview of what’s in that file. First, you need to import:
>>> from projects.models import Project
Now, you can interact with it and revisit what you did to get all of the models:
>>> projects = Project.objects.all()
Comments & Discussion
Become a Member to join the conversation.