@set_database
def get_content_item(content_id=None, topic=False, **kwargs):
 if content_id:
  if topic:
   value = Item.get((Item.id == content_id), (Item.kind == 'Topic'))
  else:
   value = Item.get((Item.id == content_id), (Item.kind != 'Topic'))
  return model_to_dict(value)

@ set_database def get_content_item ( content_id = None , topic = False , ** kwargs ) : if content_id : if topic : value = Item . get ( ( Item . id == content_id ) , ( Item . kind == 'Topic' ) ) else : value = Item . get ( ( Item . id == content_id ) , ( Item . kind != 'Topic' ) ) return model_to_dict ( value )
convenience function for returning a fully fleshed out content node for use in rendering content to save server processing .