django-statistics

How to run static file when debug is false? [closed]

感情迁移 提交于 2021-02-13 17:41:16
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 days ago . Improve this question With debug turned off Django won't handle static files for you any more - your production web server. Implement this code inside your project: settings.py STATIC_DIR=os.path.join(BASE_DIR,'static') STATIC_URL = '/static/' if DEBUG: STATICFILES_DIRS = [ STATIC_DIR,

How to run static file when debug is false? [closed]

有些话、适合烂在心里 提交于 2021-02-13 17:39:27
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 days ago . Improve this question With debug turned off Django won't handle static files for you any more - your production web server. Implement this code inside your project: settings.py STATIC_DIR=os.path.join(BASE_DIR,'static') STATIC_URL = '/static/' if DEBUG: STATICFILES_DIRS = [ STATIC_DIR,

Static files not working in Django

别说谁变了你拦得住时间么 提交于 2019-12-11 19:26:57
问题 My static files were absolutely working fine, but yesterday I tried using the app allauth and since then my static files are not being displayed. It is not showing any css or js. I tried commenting the allauth app and even then it does not work. However I just figured out the problem. Django is appending the wrong path to the static files. It should be /static/style.css but it is searching it at /"module-name"/style.css What could be the possible reason. I have correctly configured the static