django static files missing


1. Modify STATIC_ROOT in settings.py to be the physical path of your static static files. For example, my static files are stored in /home/user/www/static , first create the static folder in the www directory, and finally modify settings.py STATIC_ROOT points to /home/user/www/static .


2. Run the python manage.py collectstatic command, which will copy the necessary static files from the Django resource bundle to the static folder indicated by STATIC_ROOT, which includes the necessary style sheets (style), images (image) and Script (js) etc.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821357&siteId=291194637