manage.py syncdb on windows for Google App Engine Patch does not work
I have installed Google App Engine patch and I get the following error when I want to sync the DB
开发者_Python百科Command on command prompt on windows
manage.py syncdb
The Google App Engine SDK could not be found!Visit http://code.google.com/p/app-engine- patch/ for installation instructions.
I have installed win32api too and it still recurs. appcfg.py and dev_appserver.py works normally.
EDIT
Added and removed following paths from PATH
F:\Program Files\Google\google_appengine\google
F:\Program Files\Google\google_appengine\lib
EDIT The following hack has made it working but I hope there is a better way
SDK_PATH = "F:\Program Files\Google\google_appengine"
in aecmd.py in common\appenginepatch
A little more reading helped , and thanx to Jesaja Everling
specifically the line
If you were using Django with a relational database, you would now have to run manage.py syncdb to create the necessary database tables. With App Engine this happens on the fly.
Additionally, improved the hack to
if os.name in ('nt', 'dos'):
#Below path only considers C:\\Program Files
#prefix = '%(PROGRAMFILES)s' % os.environ
#paths.append(prefix + r'\Google\google_appengine')
#check all drives for path
for path in os.environ.get('PATH', '').split(';'):
if path.endswith('google_appengine') or path.endswith('google_appengine\\') :
paths.append(path)
PROGRAMFILES gives only C: by default and my google_appengine is in F:
精彩评论