For me, PYTHONPATH haven't worked, but this comment helped me out.
Also don't forget to restart AppEngine Launcher after PIL installed.
experiences with google application engine
# --- 404 page ---- url: /.*script: 404.py
class User(db.Model):
name = db.StringProperty()
class Phone(db.Model):
number = db.PhoneNumberProperty()
user = db.ReferenceProperty(User)
# fetch one user
username = 'John'
user = User().all().filter('name = ', username).get()
# get the first associated phone number for a user
phonenum = user.phone_set[0].number
# list all phone numbers of the user
for phonenum in user.phone_set:
# phonenum here contains the user's actual phonenum in the list
match_non_alnum = re.compile("[^a-zA-Z0-9]+")def dig_url_encode(string):"""Converts common ISO88592/1 chars to ASCII and removes any special chars"""r = {u'á': u'a',u'é': u'e',u'í': u'i',u'ó': u'o',u'ö': u'o',u'õ': u'o',u'ő': u'o',u'ú': u'u',u'ü': u'u',u'ű': u'u',u'û': u'u',u'Á': u'A',u'É': u'E',u'Í': u'I',u'Ó': u'O',u'Ö': u'O',u'Ő': u'O',u'Ú': u'U',u'Ü': u'U',u'Ű': u'U'}for key, value in r.items():string = string.replace(key, value)return match_non_alnum.sub(' ', string).strip().replace(' ', '_')
class Example(db.Model)username = db.StringProperty()password = db.StringProperty()examples = Example().all().fetch(10)for example in examples:example.address = 'hello'template_values = {'examples': example}
class Example(db.Model)username = db.StringProperty()password = db.StringProperty()examples = Example().all().fetch(10)elist = []for example in examples:eitem = {'example': example,'example_address': 'hello'}elist.append(eitem)template_values = {'examples': elist}