Score:0

Django: How to detect if project is running with a DEBUG= True or False

ru flag

I have the Amazon S3 service configured and working well. I created a FOLDER structure for all the files that my website will load to S3.

What I need to do is:

  • if I am working on develop mode (DEBUG =True) I want to add a prefix in the folders like dev.
  • If woking in production the prefix will pro

I have a settings_pro.py and a settings_dev.py files. What I don't want to do is to hard code everything or have to change the DEBUG value everytime I am running my project local on DEV mode

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.