Created
November 24, 2010 21:11
-
-
Save mccutchen/714422 to your computer and use it in GitHub Desktop.
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
| @with_appcfg | |
| def prep_local_shell(): | |
| """Prepares a local shell by adjusting the datastore paths according to | |
| the settings and setting up the appropriate stubs.""" | |
| import settings | |
| args = dev_appserver_main.DEFAULT_ARGS.copy() | |
| # If a custom datastore directory is requested, modify the args for each | |
| # of the datastore paths | |
| if hasattr(settings, 'DATASTORE_DIR'): | |
| ddir = settings.DATASTORE_DIR | |
| for key in ('datastore_path', 'history_path', 'blobstore_path'): | |
| args[key] = os.path.join(ddir, os.path.basename(args[key])) | |
| # Finally, set up the stubs | |
| dev_appserver.SetupStubs(env.gae.application, **args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment