Hey, I've been doing some changes to my django develpment env, as some of you suggested.
So far I've managed to configure and run it successfully with postgres.
Now I'm trying to run the app using apache2 and mod_wsgi, but I ran into this little problem after I followed the guidelines from the django docs.
When I access localhost/myapp/tasks this error raises:
Request Method: GET
Request URL: http://localhost/myapp/tasks/
Exception Type: TemplateSyntaxError
Exception Value:
Caught an exception while rendering: argument 1 must be a string or unicode object
Original Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/defaulttags.py", line 126, in render
len_values = len(values)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 81, in __len__
self._result_cache = list(self.iterator())
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 238, in iterator
for row in self.query.results_iter():
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 287, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 2369, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 19, in execute
return self.cursor.execute(sql, params)
TypeError: argument 1 must be a string or unicode object
... ... ...
And then it highlights a {% for t in tasks %} template tag, like the source of the problem is there, but it worked fine on the built-in server.
The view associated with that page is really simple, just fetch all Task objects. And the template just displays them on a table.
Also, some pages get rendered ok.
Don't want to fill this Question with code, so if you need some more info I'd be glad to provide it. Thanks