def post(self): idea_key = ndb.Key(urlsafe=self.request.get("idea-key")) features_for_key = Feature.query(ancestor=idea_key) for feature in features_for_key: feature.key.delete() idea_key.delete() self.redirect(self.request.referer)
def getStructuredFeaturesFromKey(key): features = [] feature_query = Feature.query(ancestor=key) for feature in feature_query: temp = [feature.key.urlsafe(), feature.title, feature.info, [], feature.canvas_url, feature.last_touch_date_time] temp[3] = getStructuredLinks(feature.linkText, feature.linkUrl) features.append(temp) return features
def getStructuredFeaturesFromKey(key): features = [] feature_query = Feature.query(ancestor=key) for feature in feature_query: temp = [ feature.key.urlsafe(), feature.title, feature.info, [], feature.canvas_url, feature.last_touch_date_time ] temp[3] = getStructuredLinks(feature.linkText, feature.linkUrl) features.append(temp) return features