diff options
author | ankitjavalkar | 2015-10-07 17:21:25 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-10-07 18:34:56 +0530 |
commit | 81393bfd4581b3f2217a979aaffec999c89d6755 (patch) | |
tree | 324a1372d80d85d48de70686b41fecd7313af21d /yaksh/scripts | |
parent | 5203ce57f2a08fe9aef8b97b569855fa9cd50ba4 (diff) | |
download | online_test-81393bfd4581b3f2217a979aaffec999c89d6755.tar.gz online_test-81393bfd4581b3f2217a979aaffec999c89d6755.tar.bz2 online_test-81393bfd4581b3f2217a979aaffec999c89d6755.zip |
Modify fixtures and load them on quickstart
Diffstat (limited to 'yaksh/scripts')
-rw-r--r-- | yaksh/scripts/cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/scripts/cli.py b/yaksh/scripts/cli.py index 5ad5ad6..ecccada 100644 --- a/yaksh/scripts/cli.py +++ b/yaksh/scripts/cli.py @@ -82,6 +82,7 @@ def create_demo(project_name='yaksh_demo', project_dir=CUR_DIR): project_path = path.join(top_dir, project_name) fixture_dir = path.join(PARENT_DIR, 'fixtures') + fixture_path = path.join(fixture_dir, 'initial_fixtures.json') # Store project details _set_project_details(project_name, top_dir) @@ -97,12 +98,14 @@ def create_demo(project_name='yaksh_demo', project_dir=CUR_DIR): command = ("python ../manage.py syncdb " "--noinput --settings={0}.demo_settings").format(project_name) + loaddata_command = "python ../manage.py loaddata {0} ".format(fixture_path) + # Create demo_settings file _render_demo_files(settings_template_path, settings_target_path, settings_context) # Create demo_urls file _render_demo_files(urls_template_path, urls_target_path) # Run syncdb - subprocess.call(command, shell=True) + subprocess.call("{0}; {1}".format(command, loaddata_command), shell=True) def run_demo(project_name, top_dir): with _chdir(top_dir): |