示例#1
0
	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)
示例#2
0
	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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
	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')
示例#6
0
 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')