This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import ndb | |
class DynamicPropertyMixin(object): | |
""" Facilitates creating dynamic properties on ndb.Expando entities. | |
Also works on ndb.Model derived classes! | |
Note: keyword args are passed on to the underlying ndb.XxxProperty() class | |
""" | |
def is_prop(self, name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var escapeHtml = (function() { | |
var entityMap = { | |
"&": '&', | |
"<": '<', | |
">": '>', | |
'"': '"', | |
"'": ''', | |
"/": '/' | |
}, | |
// simple but will recursively/blindly escape "&" |