Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.805 kb
from google.appengine.ext import db
from google.appengine.api import memcache
import logging
import helpers
class MP(db.Model):
aristotleid = db.IntegerProperty(required=True)
name = db.StringProperty(required=True)
constituency = db.StringProperty(required=True)
class KeyValue(db.Model):
k = db.StringProperty(required=True)
v = db.StringProperty(required=True)
def get(cls, key, default=None):
r = cls.all().filter('k =', key).get()
if r:
return r.v
return default
def set(cls, key, value=None):
r = cls.all().filter('k =', key).get()
if r:
r.v = value
return r
obj = cls(k=key, v=value)
return obj
Jump to Line
Something went wrong with that request. Please try again.