orthopedics manic buying avodart rate injection cheap bactrim developmental direct order buspar contamination late buy cephalexin now sexual Death cipro no rx cardiopulmonary clomid without prescription strabismus diphtheria clonidine credentialing
Chronosbox

django-reversion 1.5 error with django <1.3.x

by on Sunday, 30 October/2011, under Apache, Django, Servers

Nota: Hi my dear readers, despite ChronosBox being a amazing Blog, I’ll focus my efforts on a new blog, with my big friend Handrus Nogueira, so, don’t miss to take a look at Dev With Passion! All ChronosBox posts will be in Dev With Passion, so any content except some new comments will be different :) . See ya!

That hapened to me and I didn’t found results in Google while searching for error, so here is my 2 cents.

If you see the exception below and are running reversion 1.5.x and django 1.2.x, you should downgrade reversion to some version lower than 1.5 (current is 1.3.3). That’s why 1.5.x versions of reversion is designed to django 1.3.x (see version table here).

Follow the exception:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[Tue Sep 27 10:19:17 2011] [error] MyLDAPUser->AUTHENTICATE: felipe.rafael@pdg.com.br authenticated :D
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79] mod_wsgi (pid=14847): Exception occurred processing WSGI script '/var/www/qas3/portal/apache/virtualenv-qas3.wsgi'.
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79] Traceback (most recent call last):
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/core/handlers/wsgi.py", line 252, in __call__
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     response = middleware_method(request, response)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/site-packages/reversion/middleware.py", line 20, in process_response
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     reversion.revision.end()
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/site-packages/reversion/revisions.py", line 301, in end
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     comment = self._state.comment,
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/manager.py", line 138, in create
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     return self.get_query_set().create(**kwargs)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/query.py", line 358, in create
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     obj.save(force_insert=True, using=self.db)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/base.py", line 458, in save
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     self.save_base(using=using, force_insert=force_insert, force_update=force_update)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/base.py", line 551, in save_base
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     result = manager._insert(values, return_id=update_pk, using=using)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/manager.py", line 195, in _insert
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     return insert_query(self.model, values, **kwargs)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/query.py", line 1524, in insert_query
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     return query.get_compiler(using=using).execute_sql(return_id)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/sql/compiler.py", line 788, in execute_sql
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     cursor = super(SQLInsertCompiler, self).execute_sql(None)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/models/sql/compiler.py", line 732, in execute_sql
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     cursor.execute(sql, params)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/backends/util.py", line 15, in execute
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     return self.cursor.execute(sql, params)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/src/django/django/db/backends/mysql/base.py", line 86, in execute
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     return self.cursor.execute(query, args)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/site-packages/MySQLdb/cursors.py", line 176, in execute
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     if not self._defer_warnings: self._warning_check()
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]   File "/opt/python2.6/lib/python2.6/site-packages/MySQLdb/cursors.py", line 92, in _warning_check
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79]     warn(w[-1], self.Warning, 3)
[Tue Sep 27 10:19:17 2011] [error] [client 192.168.20.79] Warning: Field 'manager_slug' doesn't have a default value
:

Leave a Reply

StatPress

Visits today: 34 Visits since 6 de April de 2009: 87257 Visitors now: %visitoronline%