python - django-nonrel for AppEngine on Windows -
i'm having trouble should relatively simply- getting django-nonrel project off ground on windows machine. have downloaded , unzipped required files http://djangoappengine.readthedocs.org/en/latest/installation.html, added required modules projects root folder c:\djangoapp, such folder hierarchy (note each module contains correct files, , have been omitted sake of brevity)
djangoapp/ autoload/ dbindexer/ django/ djangoappengine/ djangotoolbox/
now when cd c:\djangoapp, need know command run. given command:
pythonpath=. python django/bin/django-admin.py startproject \ --name=app.yaml --template=djangoappengine/conf/project_template myapp .
is *nix os , won't work on windows. doing,
python django/bin/django-admin.py startproject \ --name=app.yaml --template=djangoappengine/conf/project_template myapp
returns error:
traceback (most recent call last): file "django/bin/django-admin.py", line 2, in <module> django.core import management importerror: no module named django.core
obviously there issue pythonpath given unix command starts pythonpath=. how execute equivalent on windows box django-nonrel , running? in advance!
p.s. sake of learning, break down given unix command, far periods , backslash doing. thanks, again!
****** update in response answer *******
thanks ton, nick! answered every part of question, , solution worked perfectly. unfortunately next step,
python manage.py runserver
ran strange error:
file "c:\program files (x86)\google\google_appengine\google\appengine\ext\testbed\__init__.py", line 585, in init_images_stub raise stubnotsupportederror(msg) google.appengine.ext.testbed.stubnotsupportederror: not initialize images api; missing python "pil" module.
obviously not right solution, went file location , commented out relevant block dealing image stub, , server started fine. if knows actual solution, let me know while little more!
thanks again
in original command, pythonpath=.
setting environment variable pythonpath
.
, special symbol current directory. think both env vars , special symbol current directory exist in windows cmd, although particular syntax doesn't translate. special dot character used @ end of command, after myapp
.
this means python path include current directory, , interpreter referenced modules within current directory.
the backslash used before newline character, not disrupt interpretation of command.
elsewhere on internet (for example this question), can find examples of how set environment variables in context of windows cmd.
the current directory symbol in windows %cd%
.
in linux, can set environment variables in same line command, in windows, need set command prior main command.
in windows, might need make .cmd
file , have contain:
set pythonpath=%cd% python django/bin/django-admin.py startproject --name=app.yaml --template=djangoappengine/conf/project_template myapp %cd%
Comments
Post a Comment