linking CSS into django .html file -
i lost in finding out how link external .css file in html template. have read (or @ least tried read) https://docs.djangoproject.com/en/dev/howto/static-files/ , still lost. .html file in
c:\users\me\documents\mysite\templates
and .css file in
c:\users\me\documents\mysite\templates\static\css
in settings.py, made
static_root = 'c:/users/me/documents/mysite/templates/static' static_url = '/static/'
in .html file, trying link css doing
<link href="{{ static_url }}css/style.css" rel="stylesheet" type="text/css" />
any idea missing or doing wrong?
static
folder must myapp
folder @ same level templates
folder , views.py
Comments
Post a Comment