djangobook.com
djangobook.com copied to clipboard
Tell user to user to use manage.py shell before introducing to template ...
...code
I think this would help user to realize in this tutorial the context was to use this code inside mamage.py shell not regular python shell. Yes this was described later but telling them earlier will help them play with the code if they play with code and reading this book at the same time.
I agree with this. I ran into the same issue and was looking around for 20 minutes trying to figure out how to get the example to work until I just read the very next paragraph. I think with manuals like this, we are trained to master the exact line we are one before we even glance over at the next instruction, so I feel this would be a common problem to many.
True, it should be added to chapter04.rst, line 142: Launch shell for your django project with "python manage.py shell"
Also, here is a link to answer and explanation on the StackOverflow: http://stackoverflow.com/questions/15556499/django-db-settings-improperly-configured-error
Citation: "You can't just fire up python and check things, django doesn't know what project you want to work on. You have to do one of these things: ..."
Upd: There is an explanation already. So, there just should be just a note "The following code will not run in the normal python shell, because django doesn't know what project you want to work on. You will see how to run the python shell within your project scope in the next paragraph."