I have an issue where, when I log in to the Django admin site, I get a template syntax error in /Library/Python/2.6/site-packages/django/template/debug.py in render_node, line 81.
I can’t find out how to solve this as it is part of Django, I didn’t write the code and I have no idea how it works.
This did work fine up until a few days ago when I last tried it.
The error is:
Caught an exception while rendering: name 'pest' is not defined
Where pest is the name of my project. As far as I know, I have all the apps in my project installed correctly.
Thanks in advance!
It turns out it was a rather simple thing, I am just not experienced enough with Python and I was calling on my .NET experience. Bad mistake.
I called
project.settings.SETTINGwhere I should have importedproject.settingsand then accessedsettings.SETTING.In .NET the imports act just shortcuts so you don’t have to type the whole ‘path’ to the function or setting, whereas in Python it seems that you must have the things you are using imported.
I don’t know if that makes any sense, or if it even correct, but it now works. Thanks for everyone’s help, you are always a great help and I wouldn’t be able to do this development and advance my knowledge without the resources here.