Problem when rendering html

Hello, I’m new to the use of Django and web development.

I’ve tried to download a predifined sidebar for my project (downloaded the 4th here).

When trying it out in a browser it seemed perfect (just like showned on the site).

But when rendering it:

return render(request, ‘sidebar/index.html’, {})

Some part of it dowsn’t load:

Please copy/paste the console output from your runserver console - that’ll show any errors and HTTP response codes generated from the request. It would probably also be helpful to see the template (index.html) to verify that the right references are present, along with verification that the referenced js/css files are in the proper locations.

(Note: When posting these references, please enclose them between lines consisting of three backtick (`) characters. In other words, you would have one line with only ```, followed by your code, followed by another line with only ```. Be sure you use the backtick character (`) and not the apostrophe (’). )

Ken

1 Like

I didn’t even thought about taking a look at the console for errors. Silly me

When I looked at it I noticed that all the css/js that was supposed to be called wasn’t found and there was a message

Not Found: /character/js/main.js
[24/Jun/2020 07:35:50] "GET /character/js/main.js HTTP/1.1" 404 2694

(character is that name of tha app I am working in).

I moved all the css and js in a static folder and altered the paths to these so that they are found through static files and it now works perfectly.

Thank you for the help