Fabric for configuration changing
Ok, i'll try to begin.
So, you (especially if you pythonist) use fabric. If not - you must begin right now! Fabric have many useful things, but can't work with comments locally. So i've fix that issue: https://gist.github.com/2284744
Example:
When i run:
$ fab runserver
my fabfile run:
def runserver():
luncomment('/etc/hosts', '#-L', use_sudo=True)
update_settings('develop')
local('{0} runserver'.format(env.manage))
whish in fact start:
$ ./.env/bin/python ./project/manage.py runserver
with pervious uncomment some domains in /etc/hosts which contain '#-L' comment and switch settings to 'development' variant (uncomment strings which contain '#-D' and comment which contains '#-P' and '#-T')
Written by Vadim Lopatyuk
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#