I'm following the djangogirls tutorial and everytime my app attempts to collect static I end up with these errors, so I can't --nuke the server or create a superuser. The real problem with this error is that my settings.py stops at line 122, so fixing the path variable at 124 isn't even an option here. I've checked both my github and my local app and they both stop at line 122.
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 308, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/dixoncodes/dixoncodes.pythonanywhere.com/mysite/settings.py", line 124, in <module>
MEDIA_ROOT = Path(BASE_DIR / 'media')
NameError: name 'Path' is not defined
These are the last few lines of my settings.py file.
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')