Take a look at how your template is displaying. Your project page is showing the title, description, and technology! Now let’s use the for
loop to display all of the projects. You’re going to add data through the Django shell. To start the Django shell, type the following:
$ python manage.py shell
You need to modify models.py
. You’re going to have to import:
>>> from projects.models import Project
Now, you’re able to create another instance of Project
:
>>> p = Project(title="test number 2", description="this is about more testing yes yes!", technology="Django", image="testproject.png")
Gascowin on Oct. 20, 2019
Very well taught material good sir! Thanks for showcasing how data can be added to the database from the Django terminal. I imagine there should be a way to add these more efficiently?