codeforamerica / srtracker

Open311 Service Request Status Site
BSD 3-Clause "New" or "Revised" License
20 stars 23 forks source link

Bug report, call to render_template fails. #23

Closed h4ck3rm1k3 closed 12 years ago

h4ck3rm1k3 commented 12 years ago

Patch is here: https://github.com/h4ck3rm1k3/srtracker/commit/2eb07fbd2f29bb60701ce8316b1b76bdaf663e72

Basically you call render_template like this :

render_template('index.html', sr=service_requests)

Here the error report :

127.0.0.1 - - [12/Aug/2012 15:06:29] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/share/pyshared/flask/app.py", line 874, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/share/pyshared/flask/app.py", line 864, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/share/pyshared/flask/app.py", line 861, in wsgi_app
    rv = self.dispatch_request()
  File "/usr/share/pyshared/flask/app.py", line 696, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/mdupont/experiments/codeforamerica/srtracker/app.py", line 98, in index
    return render_template('index.html', service_requests)
TypeError: render_template() takes exactly 1 argument (2 given)
Mr0grog commented 12 years ago

Mike, this issue was introduced in your fork: https://github.com/h4ck3rm1k3/srtracker/commit/6a9dc420c30ce1364f591580150e5beb59413866

The code where the issue was introduced has not even been merged here. SRTracker doesn't exhibit this issue.