def set_paths(self):
        self.config['TEMPLATE_DIRS'] = (os.path.join(self.projectdir, "templates"),)
        self.config['LOG_DIR'] = os.path.join(self.projectdir, 'log')
        self.config['MEDIA_ROOT'] = os.path.join(self.projectdir, 'media/')
        self.config['OPUS_SECURE_UPLOADS'] = os.path.join(self.projectdir, "opus_secure_uploads/")
        self.config.save()

        # Set a new manage.py with appropriate paths
        manage = """#!/usr/bin/env python
from django.core.management import execute_from_command_line

import os, os.path
import sys
projectpath = {projectdir!r}
sys.path.append(projectpath)
sys.path.append({opuspath!r})
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
os.environ['OPUS_SETTINGS_FILE'] = os.path.join(projectpath, 'opussettings.json')
try:
    open(os.path.join(projectpath, "settings.py"), 'r')
except IOError, e:
    sys.stderr.write("Error: Can't open the file 'settings.py' in %r.\\n" % projectpath)
    sys.stderr.write(str(e)+'\\n')
    sys.exit(1)

if __name__ == "__main__":
    execute_from_command_line()
"""
        with open(os.path.join(self.projectdir, "manage.py"), 'w') as manageout:
            manageout.write(manage.format(
                projectdir=self.projectdir,
                opuspath=os.path.dirname(opus.__path__[0])))
Acquire a lock in zookeeper for autoscaling. This is
dataset/ETHPy150Open bmbouter/Opus/opus/lib/deployer/__init__.py/ProjectDeployer.set_paths--crossover with--dataset/ETHPy150Open Yelp/paasta/paasta_tools/autoscaling_lib.py/create_autoscaling_lock