I'm getting an error TypeError: unsupported operand type(s) for /: 'str' and 'module' [09/Feb/2021 16:26:28] "GET / HTTP/1.1" 500 61800
while connecting client to the server. When I'm not connected all runs fine. Problem lies somewhere in my file views.py where i get error
I've tried multiple of possibilities of concatenating two parts of the HttpResponse, always resulted in either problem with str and module or str and function. I know it just looks like a poor laziness but I swear I was trying to resolve the issue for the last 40 minutes and got a strong headache from that. So be kind, please. Thanks for any help, promise I'll respond to any feedback after I take a Aspirin.
simple use Double Quotes for the entire string, and single quotes for the link in the anchor tag, like this:
return HttpResponse("Rango says hey there partner! <a href='/rango/about/'>About</a>")
return HttpResponse("Rango says here is the about page. <a href='/rango/'>Index</a>")
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments