Commits

Anonymous committed 79abb2b

Repaired soupstart, more fabric changeovers required.

Comments (0)

Files changed (1)

djaboto/management/commands/checkmix.py

     ## Create the base project structure using the built-in commands from
     # Django after changing directories accordingly
     print "...start project using django-admin.py"
-    check_call(['django-admin.py', 'startproject', '--template',args.template, '-econf,sh', args.site_name])
+    check_call(['django-admin.py', 'startproject', '--template=%s' % args.template, '-econf,sh', args.site_name])
 
     ## Install required modules
     REQ_TXT = os.path.join(DIR_PROJECT, "requirements.txt")
     DIR_DATACONF_NEW = os.path.join('/home', getuser(), '.soupmix', args.site_name)
     if not os.path.exists(DIR_DATACONF_NEW):
         print DIR_DATACONF_NEW
-        fab_api.run('python manage.py migrate --verbosity=0')
+        # fab_api.run('python manage.py migrate --verbosity=0')
         fab_api.run('mkdir -p %s' % DIR_DATACONF_NEW)
-        fab_api.run('mv %s/grape_data %s' % (DIR_BIN_OLD, DIR_DATACONF_NEW))
-        check_call(['mv', '%s/nymph_data' % DIR_BIN_OLD, DIR_DATACONF_NEW])
-    localhost_datafile = os.path.join(DIR_DATACONF_NEW, '%s_data' % gethostname())
+        fab_api.run('mv %s/grape_data.sh %s' % (DIR_BIN_OLD, DIR_DATACONF_NEW))
+        check_call(['mv', '%s/nymph_data.sh' % DIR_BIN_OLD, DIR_DATACONF_NEW])
+    localhost_datafile = os.path.join(DIR_DATACONF_NEW, '%s_data.sh' % gethostname())
     fab_api.env.host_string = 'localhost'
     if os.path.exists(localhost_datafile):
         print localhost_datafile
         DIR_BIN_NEW = os.path.join(DIR_PROJECT, 'bin')
         print DIR_BIN_NEW
         check_call(['mv', '-p', DIR_BIN_OLD, DIR_BIN_NEW])
-        raise Exception("Create a local database config file for the site at %s/%s_data" % (DIR_BIN_NEW, gethostname()))
+        raise Exception("Create a local database config file for the site at %s/%s_data.sh" % (DIR_BIN_NEW, gethostname()))
 
     with fab_api.settings(
             fab_api.cd('~/django/%s' % args.site_name),
             fab_api.prefix('source ~/django/python/bin/activate'),
             fab_api.prefix('source %s' % localhost_datafile)):
-
         print '...running syncdb via manage.py'
-        check_call(['./manage.py','syncdb'])
+        fab_api.run('python manage.py syncdb --noinput --verbosity=0')
 
         print '...running migrate via manage.py with no input'
-        check_call(['./manage.py','migrate','--noinput'])
+        fab_api.run('python manage.py migrate --verbosity=0')
 
         print '...running collectstatic -l via manage.py with no input'
-        check_call(['./manage.py','collectstatic','-l','--noinput'])
+        fab_api.run('python manage.py collectstatic -l --noinput')
 
     print '...fixing static directory permissions'
     check_call(['sudo', 'chown', '-R', ':www-data', DIR_STATIC])