static is a separate problem Take http://192.168.0.27:8000/stat... as an example Project path (the folder where manage.py is located): c:/test/ app path: c: /test/app/
1. Add: STATIC_URL = '/static/' in the setting That is, directly call the static file in the app path, such as: c:/test/app/static/bootstrap.min.css
2. Add: STATIC_ROOT = os.path.join(BASE_DIR,'static') You need to execute python manage.py collectstatic under the c:/test/ path and then call c:/test/static/ The file bootstrap.min.css
static is a separate problem
Take http://192.168.0.27:8000/stat... as an example
Project path (the folder where manage.py is located): c:/test/
app path: c: /test/app/
1. Add: STATIC_URL = '/static/' in the setting
That is, directly call the static file in the app path, such as: c:/test/app/static/bootstrap.min.css
2. Add: STATIC_ROOT = os.path.join(BASE_DIR,'static')
You need to execute python manage.py collectstatic
under the c:/test/ path and then call c:/test/static/ The file bootstrap.min.css