Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     super(EntryForm, self).__init__(*args, **kwargs)
     categories = category_service.get_all_categories()
     self.category.choices = [(cat.key.urlsafe(), cat.category)
                              for cat in categories]
     tags = tag_service.get_all_tags()
     self.tags.choices = [(tag.key.urlsafe(), tag.tag) for tag in tags]
Ejemplo n.º 2
0
 def get():
     categories = service.get_all_categories()
     view = [CategorySummaryView(cat).__dict__ for cat in categories]
     return Response(json.dumps(view), 200, mimetype="application/json")
Ejemplo n.º 3
0
 def get():
     categories = service.get_all_categories()
     view = [CategorySummaryView(cat).__dict__ for cat in categories]
     return Response(json.dumps(view), 200, mimetype='application/json')
Ejemplo n.º 4
0
	def __init__(self, *args, **kwargs):
		super(TagForm, self).__init__(*args, **kwargs)
		categories = category_service.get_all_categories()
		self.category.choices = [(cat.key.urlsafe(), cat.category) for cat in categories]
Ejemplo n.º 5
0
	def __init__(self, *args, **kwargs):
		super(EntryForm, self).__init__(*args, **kwargs)
		categories = category_service.get_all_categories()
		self.category.choices = [(cat.key.urlsafe(), cat.category) for cat in categories]
		tags = tag_service.get_all_tags()
		self.tags.choices = [(tag.key.urlsafe(), tag.tag) for tag in tags]
Ejemplo n.º 6
0
 def __init__(self, *args, **kwargs):
     super(TagForm, self).__init__(*args, **kwargs)
     categories = category_service.get_all_categories()
     self.category.choices = [(cat.key.urlsafe(), cat.category)
                              for cat in categories]