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]
def get(): categories = service.get_all_categories() view = [CategorySummaryView(cat).__dict__ for cat in categories] return Response(json.dumps(view), 200, mimetype="application/json")
def get(): categories = service.get_all_categories() view = [CategorySummaryView(cat).__dict__ for cat in categories] return Response(json.dumps(view), 200, mimetype='application/json')
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]
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]
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]