Created
September 5, 2014 19:58
-
-
Save anxiousmodernman/10e5f7d5e0c2601079ac to your computer and use it in GitHub Desktop.
If I have multiple project roots I can update them all by simply changing the SOURCE variable at the top of my config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Set this to the current project you're working on. | |
""" | |
SOURCE = 'MLSListings_new' | |
if SOURCE == 'GEPAR': | |
PROJECT_ROOT = 'C:\\Users\\cmcfarland\\Dropbox\\Homesnap\\Projects\\GEPAR\\' | |
sqlfile = PROJECT_ROOT + 'insert_template.sql' | |
mappingfile = PROJECT_ROOT + 'fields_added.csv' | |
if SOURCE == 'MLSListings_new': | |
PROJECT_ROOT = 'C:\\Users\\cmcfarland\\Dropbox\\Homesnap\\Projects\\MLSListings_new\\' | |
sqlfile = PROJECT_ROOT + 'insert_template.sql' | |
mappingfile = PROJECT_ROOT + 'fields_added.csv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remember, when you import config.py, python will run the whole file, so the if statements will be evaluated, and the configs will be set correctly.