Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of

  • Loading branch information...
commit 076fdb3faa381622a17d31e58c048af0c83f2980 2 parents d66a0d6 + 1c5b329
@nikolajbaer authored
Showing with 4 additions and 2 deletions.
  1. +3 −2 reportengine/
  2. +1 −0  reportengine/
5 reportengine/
@@ -119,13 +119,14 @@ def get_rows(self,filters={},order_by=None):
# TODO incorporate offset/limit somehow
from django.db import connection
cursor = connection.cursor()
+ # TODO named parameters don't work in SQLite3, so this doesn't hold up
if self.row_sql:
- cursor.execute(self.row_sql%filters)
+ cursor.execute(self.row_sql,filters)
else: rows=[]
if self.aggregate_sql:
- cursor.execute(self.aggregate_sql%filters)
+ cursor.execute(self.aggregate_sql,filters)
result=cursor.fetchone() # only fetch first row
1  reportengine/
@@ -26,6 +26,7 @@ def report_list(request):
# TODO build date_field redirects.. so view is at /current/<day|week|month|year>/<slug>/<format>/ and redirects
# to the appropriate date filter
# TODO assign appropriate permissions. Some reports might need to be accessible via OAuth or some other mechanism
+# TODO generate report in separate method. views should be thin!
def view_report(request, namespace, slug, output=None):
report = reportengine.get_report(namespace,slug)()
Please sign in to comment.
Something went wrong with that request. Please try again.