Hi,
It does load the page, but the bootstrap doesn’t actually style the page
it’s a basic start template
base.html
{% load static %}
*<link rel="icon" type="image/x-icon" href="{% static 'assets/favicon.ico' %}" />*
*<!-- Core theme CSS (includes Bootstrap)-->*
*<link href="{% static 'css/styles.css' %} " rel="stylesheet" />*
<!-- Core theme JS-->
<script src="{% static 'js/scripts.js' %}"></script>
‘DIRS’: [os.path.join(BASE_DIR, ‘templates’)],
STATIC_URL = ‘templates/static/’
STATICFILES_DIRS = [os.path.join(BASE_DIR,‘static’)]
STATIC_ROOT = os.path.join(BASE_DIR, “static_collect”)
1 Like
First, it appears that you’re trying to mix your templates with your static files. You don’t want to do that - they’re completely separate. Templates and static files are not the same and are managed independently of each other.
Review the docs at How to manage static files (e.g. images, JavaScript, CSS) | Django documentation | Django.
Now, we’re going to need a lot more details about your project and the directories in which these various files reside. Please describe the directory structure of your project.
Is this a local development environment or a production environment?
What operating system are you using? What versions of Python and Django?
Is this your first Django project, or have you successfully deployed other projects? (And if you have, what is different about this project?)
If this is your first Django project, have you worked your way through the official Django tutorial?
1 Like