hop into the interactive Python shell and play around with the free API Django gives you.
To invoke the Python shell, use this command: $ python3 manage.py shell
We’re using this instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file.
This is an interactive exploration, thus leaving no real artifacts for process definition.
$ python3 manage.py shell
...while (per the tutorial) in a parallel terminal session, we modify models.py
Per the guide, Playing with the API, we should be able to:
hop into the interactive Python shell and play around with the free API Django gives you.
To invoke the Python shell, use this command:
$ python3 manage.py shell
We’re using this instead of simply typing “
python
”, becausemanage.py
sets theDJANGO_SETTINGS_MODULE
environment variable, which gives Django the Python import path to yourmysite/settings.py
file.This is an interactive exploration, thus leaving no real artifacts for process definition.
...while (per the tutorial) in a parallel terminal session, we modify
models.py