def get_ordered_categories():
 database_cats = get_categories()
 categories = []
 for cat in database_cats.keys():
  if (cat != '*'):
   categories.append(database_cats[cat].get_dict())
 categories.sort(key=(lambda cat: cat['order']))
 categories.insert(0, database_cats['*'].get_dict())
 return categories

def get_ordered_categories ( ) : database_cats = get_categories ( ) categories = [ ] for cat in database_cats . keys ( ) : if ( cat != '*' ) : categories . append ( database_cats [ cat ] . get_dict ( ) ) categories . sort ( key = ( lambda cat : cat [ 'order' ] ) ) categories . insert ( 0 , database_cats [ '*' ] . get_dict ( ) ) return categories
return list-copy of categories section thats ordered by users ordering including default-category .