Reputation: 1
Trying the python crash course web app project.
Python manage.py runserver
is throwing off a bunch of errors
Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/Users/me/Pictures/Python/learning_log/ll_env/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs
I figured it out actually, but not sure why or how it works, but decided to leave it here in case someone comes across the same problem in the future.
In the urls.py
file, the textbook tells you to add
"url(r'', include('learning_logs.urls', namespace='learning_logs')),"
what fixes it is adding this instead of the above,
"path('', include('learning_logs.urls'), name='learning_logs'),"
'''
python manage.py runserver
'''
Upvotes: 0
Views: 3251
Reputation: 1
What solved my problem was: using this line instead of the one from the textbook
"path('', include('learning_logs.urls'), name='learning_logs'),"
Upvotes: 0