def get(self, startKey=None): ''' Return activities by pack of LIMIT at JSON format. If a start key is given in URL (it means a date like 2010-10-05-12-30-48), activities until this date are returned. Else latest activities are returned. Arguments: *startKey* The date until where activities should be returned. ''' if startKey: dateString = date_util.get_db_utc_date_from_url_date(startKey) docs = ActivityManager.get_all(startKey=dateString, tag="all") else: docs = ActivityManager.get_all() for doc in docs: try: subdoc = Activity.get_db().get(doc.docId) doc.subdoc = subdoc except: pass self.return_documents(docs)
def get(self, startKey=None): ''' Return activities by pack of LIMIT at JSON format. If a start key is given in URL (it means a date like 2010-10-05-12-30-48), activities until this date are returned. Else latest activities are returned. Arguments: *startKey* The date until where activities should be returned. ''' if startKey: dateString = date_util.get_db_utc_date_from_url_date(startKey) docs = ActivityManager.get_all(startKey=dateString, tag="all") else: docs = ActivityManager.get_all() for doc in docs: try: subdoc = Activity.get_db().get(doc.docId) doc.subdoc = subdoc except: pass self.return_documents(docs)