On Wednesday 03 Feb 2010 11:44:36 am Russell Keith-Magee wrote: > Ok - seriously - if you want help debugging this, you need to get your > story straight. >
please believe me - I *am* trying. Ok, lets try to be straight: 1. site used for testing: http://bitbucket.org/lawgon/csrftest/src/ 2. site crashes in 12352, 12359,12360 and current trunk and in every revision in between that I have tested. Works perfectly in 12351. I get the same crash but varying errors on all other sites. The original error in the subject line was obtained from a platform of nginx+tornado, which I have stopped using due to csrf and other problems. There are also a huge number of imports in the test site, one of which may cause the error. 3. platform - run server 4. two different errors occur, one for 127.0.0.1:8000/admin/ and the other when clicking the submit button on 127.0.0.1/addtest/ the two errors are: from admin (on attempting to load admin): Environment: Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.2 alpha 1 SVN-12377 Python Version: 2.6.0 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'csrftest.web'] Installed Middleware: ('django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/lib/python2.6/django/core/handlers/base.py" in get_response 101. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.6/django/contrib/admin/sites.py" in wrapper 206. return self.admin_view(view, cacheable)(*args, **kwargs) File "/usr/lib/python2.6/django/utils/decorators.py" in __call__ 36. return self.decorator(self.func)(*args, **kwargs) File "/usr/lib/python2.6/django/utils/decorators.py" in _wrapped_view 86. response = view_func(request, *args, **kwargs) File "/usr/lib/python2.6/django/utils/decorators.py" in __call__ 36. return self.decorator(self.func)(*args, **kwargs) File "/usr/lib/python2.6/django/views/decorators/cache.py" in _wrapped_view_func 70. response = view_func(request, *args, **kwargs) File "/usr/lib/python2.6/django/contrib/admin/sites.py" in inner 188. if not self.has_permission(request): File "/usr/lib/python2.6/django/contrib/admin/sites.py" in has_permission 145. return request.user.is_active and request.user.is_staff File "/usr/lib/python2.6/django/contrib/auth/middleware.py" in __get__ 9. request._cached_user = get_user(request) File "/usr/lib/python2.6/django/contrib/auth/__init__.py" in get_user 97. user_id = request.session[SESSION_KEY] File "/usr/lib/python2.6/django/contrib/sessions/backends/base.py" in __getitem__ 46. return self._session[key] File "/usr/lib/python2.6/django/contrib/sessions/backends/base.py" in _get_session 172. self._session_cache = self.load() File "/usr/lib/python2.6/django/contrib/sessions/backends/db.py" in load 21. expire_date__gt=datetime.datetime.now() File "/usr/lib/python2.6/django/db/models/manager.py" in get 132. return self.get_query_set().get(*args, **kwargs) File "/usr/lib/python2.6/django/db/models/query.py" in get 334. num = len(clone) File "/usr/lib/python2.6/django/db/models/query.py" in __len__ 79. self._result_cache = list(self.iterator()) File "/usr/lib/python2.6/django/db/models/query.py" in iterator 267. for row in compiler.results_iter(): File "/usr/lib/python2.6/django/db/models/sql/compiler.py" in results_iter 685. for rows in self.execute_sql(MULTI): File "/usr/lib/python2.6/django/db/models/sql/compiler.py" in execute_sql 740. cursor.execute(sql, params) File "/usr/lib/python2.6/django/db/backends/util.py" in execute 19. return self.cursor.execute(sql, params) File "/usr/lib/python2.6/django/db/backends/postgresql/base.py" in execute 57. return self.cursor.execute(sql, params) Exception Type: DatabaseError at /admin/ Exception Value: ERROR: syntax error at or near "12" LINE 1: ... AND "django_session"."expire_date" > 2010-02-03 12:07:11.1... ^ SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."session_key" = '2730ca9cb60f3ba6db7815c8aba7f166' AND "django_session"."expire_date" > 2010-02-03 12:07:11.167451 ) from the /addtest/ on pressing submit: Environment: Request Method: POST Request URL: http://127.0.0.1:8000/addtest/ Django Version: 1.2 alpha 1 SVN-12377 Python Version: 2.6.0 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'csrftest.web'] Installed Middleware: ('django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/lib/python2.6/django/core/handlers/base.py" in get_response 101. response = callback(request, *callback_args, **callback_kwargs) File "/home/lawgon/projects/csrftest/../csrftest/web/views.py" in addtest 37. fm = form.save() File "/usr/lib/python2.6/django/forms/models.py" in save 347. fail_message, commit, construct=False) File "/usr/lib/python2.6/django/forms/models.py" in save_instance 95. instance.save() File "/usr/lib/python2.6/django/db/models/base.py" in save 430. self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/lib/python2.6/django/db/models/base.py" in save_base 519. result = manager._insert(values, return_id=update_pk, using=using) File "/usr/lib/python2.6/django/db/models/manager.py" in _insert 195. return insert_query(self.model, values, **kwargs) File "/usr/lib/python2.6/django/db/models/query.py" in insert_query 1428. return query.get_compiler(using=using).execute_sql(return_id) File "/usr/lib/python2.6/django/db/models/sql/compiler.py" in execute_sql 796. cursor = super(SQLInsertCompiler, self).execute_sql(None) File "/usr/lib/python2.6/django/db/models/sql/compiler.py" in execute_sql 740. cursor.execute(sql, params) File "/usr/lib/python2.6/django/db/backends/util.py" in execute 19. return self.cursor.execute(sql, params) File "/usr/lib/python2.6/django/db/backends/postgresql/base.py" in execute 57. return self.cursor.execute(sql, params) Exception Type: DatabaseError at /addtest/ Exception Value: ERROR: column "xwa" does not exist LINE 1: INSERT INTO "web_testmodel" ("name") VALUES (xwa) ^ INSERT INTO "web_testmodel" ("name") VALUES (xwa) -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.