- Install Python. Python comes with OSX. Test by typing
python
in terminal. If it opens a python shell, you're good to go. - Install pip.
easy_install pip
works on OSX. This should add symlinks and add the executable to $PATH also. Technically you don't need to installpip
though because everyvirtualenv
environment comes withpip
. It's easier to installvirtualenv
withpip
though. Haven't triedeasy_install virtualenv
. - Install virtualenv. Run
pip install virtualenv
. You may need to add the install directory to $PATH. - Install Google AppEngine SDK from here. Drag to Applications folder. Launch it, make sure it creates symlinks. Add the
google_appengine
directory to the $PYTHONPATH environment variable. - Navigate to your project directory. There should be an
app.yaml
file in the directory if it's a Google App Engine project. - Create a new virtual environment by running
virtualenv env
. Activate it by runningsource etc/bin/activate
. I would add theenv/
that is generated to a.gitignore
if you're using version control. - Install Django in virtual env.
pip install django==1.3
. The version number is optional. It'll install the latest if you don't include it. You want to install this again in your virtual environment even if it's already installed outside. This installation will be somewhere insideenv/
- Start the server by running
dev_appserver.py .
instead ofmanage.py
ordjango-admin.py
. Default port is8080
.
Last active
December 10, 2015 05:29
-
-
Save mehulkar/4388398 to your computer and use it in GitHub Desktop.
Setting up Django/Google App Engine on a dev server
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not working for me. I don't know how recent or old this post is because I don't see a date but since it says here that your last activity was about a year ago, I hope you get a notification of my comments.
Can you be more specific on steps 6-8? Do I need to create a new app.yaml inside the env directory? Since the default directory from the appengine project is the root directory and env is a sub-directory of it what happens next? When I run the appengine project following your instructions all I get is the Hello World! that was created by the Appengine SDK application.
Should I make any changes to the original app.yaml file the Appengine created?
Any suggestion is much appreciated.
Thank you,
Rafael