Commit f0668c3642acee4c1431671a192e01daa2e9ee32

  • avatar
  • arvind
  • Mon Mar 10 18:53:54 IST 2014
Fixing typo and removing unused code and modules.
  • Diff rendering mode:
  • inline
  • side by side

query.py

1import logger1import logger
2from sqlalchemy.sql import func2from sqlalchemy.sql import func
3import datetime3import datetime
4import decimal
5
6def toStr(fn):
7 def wrapped(*args, **kwargs):
8 response = fn(*args, **kwargs)
9 if type(response) is decimal.Decimal:
10 return str(response)
11 if type(response) is dict:
12 return repr(response)
13 else:
14 return str(response)
15 return wrapped
164
17class Query:5class Query:
18 """Objects of query class can be used to run specific queries."""6 """Objects of query class can be used to run specific queries."""

report.py

7171
72 "Number_of_calls_lasting_less_than_30_seconds": callDetails.filter_calls_by_duration(startDate, endDate, 30),72 "Number_of_calls_lasting_less_than_30_seconds": callDetails.filter_calls_by_duration(startDate, endDate, 30),
7373
74 "Average_length_of_calls": average_call_length,
74 "Average_length_of_calls_in_minutes": average_call_length,
7575
76 "Total_number_of_audio_minutes_played": str(audio_minutes),76 "Total_number_of_audio_minutes_played": str(audio_minutes),
7777