|
|
|
|
|
by oellegaard
4154 days ago
|
|
You should establish a proper pattern for storing credentials instead. Many people use environment variables, but you can also use an external configuration file. Another simple pattern used a lot in django: try:
from local_settings import *
except Exception:
pass Then put any variable you want to override in local_settings.py and put local_settings.py in .gitignore |
|
I contract for a company which has set rules for their stuff. Trying to change these rules would be an amount of effort similar to becoming CEO, starting out as a deckswabber.
One of their project is a web app. It has an .htaccess file. In production it is configured to run like this:
However in development i want it to run like this: Normally you'd just put the entire file on ignore with --assume-unchanged, but that doesn't work well, since the file also contains other bits of configuration that are important for the app, and get changed fairly frequently.OP's tool is perfect for this kind of situation.