DEBUG 2024-09-24 08:54:12,815 base _resolve_lookup 770 139854127036096 Exception while resolving variable 'project' in template 'website/index.html'.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 880, in _resolve_lookup
current = current[bit]
~~~~~~~^^^^^
TypeError: 'Video' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 890, in _resolve_lookup
current = getattr(current, bit)
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Video' object has no attribute 'project'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 896, in _resolve_lookup
current = current[int(bit)]
^^^^^^^^
ValueError: invalid literal for int() with base 10: 'project'
During handling of the above exception, another exception occurred:
I isolated the error to the following in display_video_snippet.html
At some point, we allowed videos to be associated with multiple videos, so video.project no longer exists. In fact, it's commented out in the Video model:
Error on index.html load
I isolated the error to the following in display_video_snippet.html
At some point, we allowed videos to be associated with multiple videos, so
video.project
no longer exists. In fact, it's commented out in the Video model:So, the solution is something like we have in display_pub_snippet: