Example #1
0
def run_appcfg(argv):
    # import this so that we run through the checks at the beginning
    # and report the appropriate errors
    import appcfg

    # We don't really want to use that one though, it just executes this one
    from google.appengine.tools import appcfg

    # Reset the logging level to WARN as appcfg will spew tons of logs on INFO
    logging.getLogger().setLevel(logging.WARN)

    new_args = argv[:]
    new_args[1] = "update"
    new_args.append(".")
    syncdb = True
    if "--nosyncdb" in new_args:
        syncdb = False
        new_args.remove("--nosyncdb")
    appcfg.main(new_args)

    if syncdb:
        from django.core.management import call_command
        from django.db import connection

        connection.setup_remote()
        print "Running syncdb."
        call_command("syncdb", remote=True, interactive=True)

    from django.conf import settings

    if getattr(settings, "ENABLE_PROFILER", False):
        print "--------------------------\n" "WARNING: PROFILER ENABLED!\n" "--------------------------"
Example #2
0
def main():
    import appcfg
    dirname = os.path.dirname(os.path.abspath(__file__))
    if dirname.endswith('.zip'):
    	dirname = os.path.dirname(dirname)
    os.chdir(dirname)
    appcfg.main()
Example #3
0
def run_appcfg(argv):
    # import this so that we run through the checks at the beginning
    # and report the appropriate errors
    import appcfg

    # We don't really want to use that one though, it just executes this one
    from google.appengine.tools import appcfg

    # Reset the logging level to WARN as appcfg will spew tons of logs on INFO
    logging.getLogger().setLevel(logging.WARN)

    new_args = argv[:]
    new_args[1] = 'update'
    new_args.append('.')
    syncdb = True
    if '--nosyncdb' in new_args:
        syncdb = False
        new_args.remove('--nosyncdb')
    appcfg.main(new_args)

    if syncdb:
        from django.core.management import call_command
        from django.db import connection
        connection.setup_remote()
        print 'Running syncdb.'
        call_command('syncdb', remote=True, interactive=True)

    from django.conf import settings
    if getattr(settings, 'ENABLE_PROFILER', False):
        print '--------------------------\n' \
              'WARNING: PROFILER ENABLED!\n' \
              '--------------------------'
Example #4
0
def run_appcfg(argv):
    # import this so that we run through the checks at the beginning
    # and report the appropriate errors
    import appcfg

    # We don't really want to use that one though, it just executes this one
    from google.appengine.tools import appcfg

    # Reset the logging level to WARN as appcfg will spew tons of logs on INFO
    logging.getLogger().setLevel(logging.WARN)
    
    # Note: if we decide to change the name of this command to something other
    # than 'update' we will have to munge the args to replace whatever
    # we called it with 'update'
    new_args = argv[:]
    new_args.append('.')
    syncdb = True
    if '--nosyncdb' in new_args:
        syncdb = False
        new_args.remove('--nosyncdb')
    appcfg.main(new_args)

    if syncdb:
        from django.core.management import call_command
        from django.db import connection
        connection.setup_remote()
        print 'Running syncdb.'
        call_command('syncdb', remote=True, interactive=True)

    from django.conf import settings
    if getattr(settings, 'ENABLE_PROFILER', False):
        print '--------------------------\n' \
              'WARNING: PROFILER ENABLED!\n' \
              '--------------------------'
Example #5
0
def main():
    import mimetypes
    mimetypes._winreg = None
    import appcfg
    dirname = os.path.dirname(os.path.abspath(__file__))
    if dirname.endswith('.zip'):
    	dirname = os.path.dirname(dirname)
    os.chdir(dirname)
    appcfg.main()
Example #6
0
def main():
    import mimetypes

    mimetypes._winreg = None
    import appcfg

    dirname = os.path.dirname(os.path.abspath(__file__))
    if dirname.endswith(".zip"):
        dirname = os.path.dirname(dirname)
    os.chdir(dirname)
    appcfg.main()
Example #7
0
def run_appcfg():
  # import this so that we run through the checks at the beginning
  # and report the appropriate errors
  import appcfg

  # We don't really want to use that one though, it just executes this one
  from google.appengine.tools import appcfg

  # Reset the logging level to WARN as appcfg will spew tons of logs on INFO
  logging.getLogger().setLevel(logging.WARN)

  # Note: if we decide to change the name of this command to something other
  #       than 'update' we will have to munge the args to replace whatever
  #       we called it with 'update'
  new_args = sys.argv[:]
  new_args.append('.')
  appcfg.main(new_args)
Example #8
0
def run_appcfg():
    # import this so that we run through the checks at the beginning
    # and report the appropriate errors
    import appcfg

    # We don't really want to use that one though, it just executes this one
    from google.appengine.tools import appcfg

    # Reset the logging level to WARN as appcfg will spew tons of logs on INFO
    logging.getLogger().setLevel(logging.WARN)

    # Note: if we decide to change the name of this command to something other
    #       than 'update' we will have to munge the args to replace whatever
    #       we called it with 'update'
    new_args = sys.argv[:]
    new_args.append('.')
    appcfg.main(new_args)
Example #9
0
#!/usr/bin/env python
# coding=utf-8
# Contributor:
# Phus Lu <*****@*****.**>
# Wang Wei Qiang <*****@*****.**>

<<<<<<< HEAD
import sys,os
print('===============================================================')
print('GoAgent服务端部署程序, 开始上传python服务端')
print('===============================================================')
print('')
print('请输入您的appid, 多个appid请用|号隔开')
os.putenv('uploaddir', 'python')
sys.path.insert(0, 'uploader.zip')
import appcfg;appcfg.main()
print('')
print('上传成功,编辑proxy.ini把你的appid填进去,谢谢。请按任意键退出程序。')
print('===============================================================')
print('您可以访问 https://你的APPID.appspot.com/ 查看服务端版本')
print('===============================================================')
=======
__uploaddir__ = 'python' # Which Dir You Need To Upload
__proxy__= '' # Your Proxy Server Address
__need_cookies__= False # If You Want Don't Remove .appcfg_cookies,Please Set "__need_cookies__= True"


import sys,os
print('===============================================================')
print('GoAgent服务端部署程序, 开始上传'+__uploaddir__+'服务端')
print('===============================================================')
Example #10
0
import sys
sys.path.insert(0, 'uploader.zip')
import appcfg
appcfg.main()
Example #11
0
def main():
    import appcfg
    appcfg.main()