Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    Do not keep configuration in source code. Keep it in a separate data file, json or yaml or xml, or whatever (but not in Python). But separated from the app. Because you don't want to put code there, it just leads to mess. I blame Django for popularizing this anti pattern. Commented Jun 17 at 5:35
  • i see it easier to but it in a source file, because i will import those config files into 1 source file anyways, this is just a simple template, so security isn't a big concern here Commented Jun 17 at 20:16
  • 1
    It's not about security but separation of concerns. You make config a source file, and then people keep adding stuff there. Including file i/o or even network i/o. Because you have Python, then why not? And then you have a mess, for example impossible to develop locally. Do not trust developers if you can enforce good standards. Commented Jun 17 at 20:30