pythonanywhere // python manage.py collectstatic = 0静态文件复制到// 175未经修改

问题描述 投票:-1回答:1

为什么我的静态文件无法加载?

CMD

/PruebaApettito.FINAL/PruebaApettito.FINAL-master/Prueba2/proyectoapettito (master)$ python manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

/home/sagutierrezr95/PruebaApettito.FINAL/PruebaApettito.FINAL-master/Prueba2/proyectoapettito/AppApettito/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Found another file with the destination path 'admin/js/collapse.min.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.

...
0 static files copied to '/home/sagutierrezr95/PruebaApettito.FINAL/PruebaApettito.FINAL-master/Prueba2/proyectoapettito/AppApettito/static', 175 unmodified.

设置


ALLOWED_HOSTS = ['sagutierrezr95.pythonanywhere.com']

STATIC_URL = '/static/'

STATIC_ROOT = '/home/sagutierrezr95/PruebaApettito.FINAL/PruebaApettito.FINAL-master/Prueba2/proyectoapettito/AppApettito/static/'

我需要页面上的模板,但是我不知道自己在做什么错。路线应正确无误

python django pythonanywhere
1个回答
0
投票
STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), '/var/www/static/', ]

您可以使用

© www.soinside.com 2019 - 2024. All rights reserved.