I have been trying to get this to work for quite some time now but with no luck and now I’m stuck, I simply can’t get my mind around this. I know that the path I have chosen may not be the easiest but I still believe it’s the most elegant one: I want to add a middleware to my Python based Google App Engine application, enabling me to use the _method=put in order to make my app RESTful. Continue reading
Tag Archives: Python
Python OOP in 5 minutes or less
Let’s dig into our first lesson called “Python OOP in 5 minutes or less” where we will cover: Defining a class and initializing a class. Continue reading
Posted in code is poetry
Learning Python
I’m currently diving into Python and it’s quite funny. It’s so far from other languages that I know (Ruby, Java, PHP) and at the same time there are similarities.
In this post and perhaps a couple more, I will post an abstract of what I read, it will serve as my own notes and perhaps result in a “Learn Python – the 5 minute lecture series” :)
Posted in Rock n Roll
Google Appengine rendering templates
import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
# Utility function for rendering template files
def do_render(handler, template_file, vals = {}, template_dir = 'templates/'):
# Create full path to file
path = os.path.join(os.path.join(os.path.dirname(__file__), template_dir), template_file)
# Write out the content
handler.response.out.write(template.render(path, vals))
I’m actually not sure why I posted this small codesnippet here, but it’s from a small Google Appengine project that I have been working on.
It’s a great function for rendering templates (I think it’s the django way) using Google Appengine
Posted in Rock n Roll
Fooling around with app engine
As allways, developing anything but MS stuff on your windows platform causes headaces … Continue reading
Posted in code is poetry