Posts

Showing posts with the label GAE

Just finished the Web Development Course on Udacity

Image
I've just finished the Web Development Course on Udacity (in 7 days :D). I've had a great time to review the process of building a website (a blog) and many other techniques with the experienced instructor, Steve Huffman (founder of Reddit and Hipmunk): + Design the database. + Design application's workflow + Implement handler for each request + Mapping request + User's data validation (form) + Organize code + Using memcache + Using Google App Engine ... The course even gave me a chance to do things that I've never had to create myself before: - Session management - User authentication Because the web framework (Django) does all of those for me. And greater, I also had an over view of Reddit's architecture, how it works, etc... (everything is open-source) About the final, I have to do one little trick to make the grader accept my blog: * sleep 1 second after every query , for example: ... class HistoryPage (Handler):     def get(...

Google App Engine Datastore - To render an object's id in the template using jinja2

To render an object's id in the template using jinja2: {{myobject.key().id()}}

Google App Engine - Running GAE inside a virtualenv

To be able to work with Google App Engine inside a virtualenv environment, we have to do some tricks: 1. Download and extract the Google App Engine SDK for Python: + Link: https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python + Extract the zip file to /opt directory. So, the directory path for GAE is something like: /opt/gae 2. Open the activate script of the virtualenv environment at /home/.venv/myenv/bin/activate : + Find the line: PATH="$VIRTUAL_ENV/bin:$PATH" export PATH + Insert the GAE path: PATH="$VIRTUAL_ENV/bin:$PATH" PATH="/opt/gae:$PATH" export PATH Save & exit 3. Create a path configuration file for GAE inside the virtualenv environment name /home/.venv/myenv/lib/python2.7/site-packages/gae.pth with the following content: /opt/gae import dev_appserver; dev_appserver.fix_sys_path() Now you can run your GAE application inside a virtualenv environment. If you get trouble with GAE d...