I don’t have a lot of experience in Django and I am a fairly green developer. When I run the localhost I keep getting a Internal Error. I have tried most of the solutions to similar problems here and none of them works. Can anyone help me? The code is not mine so I don’t want to alter it as such either.
Here is a picture of the errors I keep getting:
3
Answers
The only thing you can do without altering the code is to enter the value "shop_all_art" in the HomePage table in the database.
Do not share code via images. You should also share the related code.
Your stacktrace clearly says, that Python is not able to access first element of
HomePage.objects.filter(value='shop_all_art')
in filebidgala/bidgala/pages/views.py
.all_art_img
is most probably empty.Looks like
all_art_img
is empty.you should check if a Query has any elements before with a method such as