Hello Everybody, i got a strange error when i am trying to test some code out of pycrust. I have a small script that sets the environment variable and starts pycrust.
o...@olaf-laptop:~/workspace/truemen$ cat debug-shell.sh #!/bin/bash cd /home/olaf/workspace/ && export PYTHONPAHT=$PYTHONPATH:$PWD/truemen: $PWD export DJANGO_SETTINGS_MODULE=truemen.settings pycrust & PyCrust 0.9.5 - The Flakiest Python Shell Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. from truemen.slogans.models import Tag, Slogan Tag.objects.get(pk=1) Traceback (most recent call last): File "<input>", line 1, in <module> File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", line 120, in get return self.get_query_set().get(*args, **kwargs) File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 300, in get num = len(clone) File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 238, in iterator for row in self.query.results_iter(): File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line 287, in results_iter for rows in self.execute_sql(MULTI): File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line 2369, in execute_sql cursor.execute(sql, params) File "/usr/lib/pymodules/python2.6/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/ base.py", line 193, in execute return Database.Cursor.execute(self, query, params) OperationalError: no such column: slogans_tag.was_modified When I am entering the exact lines of codes in manage.py shell everything works well. And also the admin interface through manage.py runserver shows no Problem and shows the was_modified Flag o...@olaf-laptop:~/workspace/truemen$ ./manage.py shell Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from truemen.slogans.models import Tag, Slogan >>> Tag.objects.get(pk=1) <Tag: Bier> the funny thing is, that it worked last week in both shells the same way. Everything was ok. After this Error came up I checked the Database with SQLiteMan and this column was present. Than I reset the the database for for my app. But nothing helped. Is it possible that I missed something to export??? I mean I can import the objects from models.py?? Please help me!! I don't know what to do. And pycrust is much more comfortable to use than the standard shell. I tried to looked through the managed.py code but it was too complex for me to understand it. Thank you in advance
-- 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.