, @Simeon Visser, - , , . sinister_user_name reddit, , , , - :
, .
:
static_url, django .
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.min.css">
URL, . static_url /static/ , ? URL- -, , . , .
, STATIC_ROOT , , -, . , manage.py collectstatic, . STATIC_ROOT, .
, , , - , python. , , - . , , python.
, :
manage.py
website/settings.py
app/models.py
app/views.py
templates/base.html
static/js/jquery.js
static/css/bootstrap.css
, , url .
: , settings.py, , , , :(
1.4 :
import os
import django
import manage
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
SITE_ROOT = os.path.dirname(os.path.realpath(manage.__file__))
, ( 1.4 1.3), SITE_ROOT . , .
:
# Additional locations of static files
STATICFILES_DIRS = (
os.path.join(SITE_ROOT, 'static'),
)
, . .