Forums

Problem with Bootstrap installation - my frontend is displayed in basic HTML

I'm trying to make an data dashboard using Bootstrap and Django following the following instructions: https://blog.via-internet.de/en/build-a-dashboard-with-django-and-bootstrap-part-1/

I'm running into problems when it comes to "Modify frontend view template". The instructions say to put

{% extends 'site/base.html' %} {% load static %} {% block title %}Dashboard with Django and Bootstrap{% endblock title %} {% block nav-style %}mkt-nav{% endblock nav-style %} {% block content %} <div class="jumbotron"> <div class="container"></div> FRONTEND <div class="container full"></div> </div> {% endblock content %}

in dashboard/apps/frontend/templates/index.html but when I do that only my base.html is displayed. When I deactivate {% extends 'site/base.html' %} and try to only index.html templates, I get a view in basic html only.

One of the potential issues might be that bootstrap and its dependencies did not install properly. I tried to rerun everything, but make install-popperjs did not run and a quick google search showed that make install might not be available on PythonAnywhere. Does anyone know of a good alternative to this?

You need to serve the static files that bootstrap relies on: https://help.pythonanywhere.com/pages/DjangoStaticFiles/, https://help.pythonanywhere.com/pages/StaticFiles/ and https://help.pythonanywhere.com/pages/DebuggingStaticFiles/

I'm not sure what you're trying to do with popperjs, and I also don't see any reference to a 'make install' for it in the installation documentation for it.