예제 #1
0
def create_dummy_request_categories():
    """ Create dummies request categories """
    category_1 = RequestCategoryEntity(category = 'hardware')
    category_1.put()

    category_2 = RequestCategoryEntity(category = 'software')
    category_2.put()
    
    return (category_1, category_2)
예제 #2
0
def get_request_category():
    """ Return the first request category in the datastore """
    return RequestCategoryEntity.all().get()
예제 #3
0
 def list_categories(cls):
     """ Return the list of request categories """
     return RequestCategoryEntity.all().fetch(100)