def getMessages(data): import datetime from templates.pages.messages import fetch_values_from_db log_details = fetch_values_from_db(json.loads(data)) for log in log_details: log.creation = datetime.datetime.strptime(log.creation, '%Y-%m-%d %H:%M:%S.%f').strftime('%d/%m/%Y %H:%M') return log_details
def getMessages(data): import datetime from templates.pages.messages import fetch_values_from_db import re TAG_RE = re.compile(r'<[^>]+>') log_details = fetch_values_from_db(json.loads(data)) for log in log_details: log.creation = datetime.datetime.strptime(log.creation, '%Y-%m-%d %H:%M:%S.%f').strftime('%d/%m/%Y %H:%M') log.subject = TAG_RE.sub('', cstr(log.subject)) return log_details
def getMessages(data): from templates.pages.messages import fetch_values_from_db return fetch_values_from_db(json.loads(data))
def getAppointments(data): from templates.pages.appointments import fetch_values_from_db return fetch_values_from_db(json.loads(data))
def getProfileMedications(data): from templates.pages.medication import fetch_values_from_db data = json.loads(data) return fetch_values_from_db(data)