Django static files

How to find where def. static stores?

[root@test smm_py]# python3 manage.py findstatic css/base.css admin/js/core.js
No matching file found for 'css/base.css'.
Found 'admin/js/core.js' here:
  /usr/local/lib/python3.4/site-packages/django/contrib/admin/static/admin/js/core.js

Then move it into the folder you need.

Don’t forget to chown and chmod

Then update django’s.conf file:

Alias /static/ "/var/www/smm_tools/site/"

And check the settings.py:

103 # Static files (CSS, JavaScript, Images)
104 # https://docs.djangoproject.com/en/1.8/howto/static-files/
105
106 STATIC_URL = '/static/'

https://docs.djangoproject.com/en/1.8/howto/static-files/

 

About trianglesis

Александр Брюндтзвельт - гений, филантроп, 100 гривен в кармане. Этот блог - "сток" моих мыслей и заметок. Достаточно одного взгляда на него, чтобы понять, что такой же бардак творится у меня в голове. Если вам этот бардак интересен - милости прошу.
Bookmark the permalink.