Home > database >  How can I fix the internal error in Django?
How can I fix the internal error in Django?

Time:01-06

I don't have a lot of experience in Django and 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 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: Error Page

CodePudding user response:

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.

CodePudding user response:

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 file bidgala/bidgala/pages/views.py. all_art_img is most probably empty.

CodePudding user response:

Looks like all_art_img is empty.

you should check if a Query has any elements before with a method such as

if all_art_img.exists():
    all_art_img[0]
  •  Tags:  
  • Related