Struktur Projekt:kann nicht geladen werden Statik Django
project_folder
├── apps
│ ├── app1
│ ├── app2
├── static
│ ├── css
│ │ ├── bootstrap.min.css
│ ├── images
│ └── js
│ │ ├── bootstrap.min.js
├── templates
│ ├── base
│ │ ├── base.html
Hier ist meine settings.py:
STATIC_PATH = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIR = [
STATIC_PATH,
]
Ich habe diese Antwort:
[10/Dec/2017 02:43:58] "GET /static/css/bootstrap.min.css HTTP/1.1" 404 1676
[10/Dec/2017 02:43:58] "GET /static/images/Logo-ISCAV.png HTTP/1.1" 404 1676
[10/Dec/2017 02:43:58] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1670
[10/Dec/2017 02:43:58] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 1670
Und hier sind einige Schlagworte im HTML
{% load staticfiles %}
<!DOCTYPE html>
<html lang="es-CL">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="UTF-8">
<title>ISCAV | {% block title %}{% endblock %}</title>
<!-- Carga el path de los archivos estaticos y estilos -->
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
{% block extrastatic %}
{% endblock extrastatic %}
</head>
Ich kann nicht sehen, was falsch ist.
Bedienen Sie die Website in der Entwicklung mit './manage.py runserver' oder auf einem Produktionsserver? – surfer190
läuft auf DEBUG mit PyCharm, Suche Ich finde, das ist ein Problem in der Regel auf dieser IDE. :/ –