python - django static folder name change -
my django project located @ c:/django/project
, static folder @ c:/django/project/app/static
. put bootstrap , jquery files template under link href="/static/
, src="/static/
. if change name of folder static files, become unavailable. tried change settings.py
settings , here code, isn't also.
static_url = '/static/
template_dirs = [os.path.join(base_dir, 'templates')] staticfiles_dirs = (os.path.join(base_dir,'/django/lingsite/inputs/static'),) static_root = os.path.join(base_dir, '../static/')
where static files folder defined?
you doing wrong, see docs: https://docs.djangoproject.com/en/1.8/howto/static-files/
this correct way locate static files:
{% static "my_app/myexample.jpg" %}
but anyway, have misconfigured paths:
static_root = os.path.join(base_dir, 'static')
Comments
Post a Comment