def get(tag): tag_entity = service.get_by_slug(Tag, tag) if tag_entity is not None: entries = service.get_all_entries_by_repeated_property(Entry.tags, tag_entity, sort=[-Entry.created]) else: entries = [] return get_sorted_entries_response_by_date(entries)
def get(category): category_entity = service.get_by_slug(Category, category) if category_entity is not None: entries = service.get_all_entries_by_ancestor(category_entity.key, sort=[-Entry.created]) else: entries = [] return get_sorted_entries_response_by_date(entries)
def get(tag): tag_entity = service.get_by_slug(Tag, tag) if tag_entity is not None: entries = service.get_all_entries_by_repeated_property( Entry.tags, tag_entity, sort=[-Entry.created]) else: entries = [] return get_sorted_entries_response_by_date(entries)
def get(category): category_entity = service.get_by_slug(Category, category) if category_entity is not None: entries = service.get_all_entries_by_ancestor( category_entity.key, sort=[-Entry.created]) else: entries = [] return get_sorted_entries_response_by_date(entries)
def get(self, year, month, slug): entry = service.get_by_slug(Entry, slug) view = EntryBannerView(entry).__dict__ return Response(json.dumps(view), 200, mimetype='application/json')