delete your app from INSTALLED_APPS and syncdb, AND list it again in INSTALLED_APPS and syncdb again..
if it doesnot work, do this: delete your db, then syncdb, then list your app in INSTALLED_APPS and syncdb again. Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac: > > Every time I edit a model and run syncdb, I get a database error telling > me that the column doesn't exist. > > *#Error Message:* > Environment: > Request Method: GET > Request URL: http://127.0.0.1:8000/tickets/2/ > > Django Version: 1.4 > Python Version: 2.7.3 > Installed Applications: > ('django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'tickets', > 'django.contrib.admin') > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware') > > > Traceback: > File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" > in get_response > 111. response = callback(request, > *callback_args, **callback_kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in view > 48. return self.dispatch(request, *args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in dispatch > 69. return handler(request, *args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get > 98. self.object = self.get_object() > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get_object > 49. obj = queryset.get() > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > get > 361. num = len(clone) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > __len__ > 85. self._result_cache = list(self.iterator()) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > iterator > 291. for row in compiler.results_iter(): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in results_iter > 763. for rows in self.execute_sql(MULTI): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in execute_sql > 818. cursor.execute(sql, params) > File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" > in execute > 40. return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" > > in execute > 52. return self.cursor.execute(query, args) > > Exception Type: DatabaseError at /tickets/2/ > Exception Value: column tickets_ticket.picture does not exist > LINE 1: ...icket"."description", "tickets_ticket"."ranking", "tickets_t... > ^ > I also noticed that when I run syncdb, It tells me that no new objects > were installed. > > But when i do python manage.py sql tickets, I get all my objects. > *#python mange.py sql tickets* > BEGIN; > CREATE TABLE "tickets_ticket" ( > "id" serial NOT NULL PRIMARY KEY, > "title" varchar(100) NOT NULL, > "date_created" timestamp with time zone NOT NULL, > "description" text NOT NULL, > "ranking" integer CHECK ("ranking" >= 0) NOT NULL, > "picture" varchar(100) NOT NULL > ) > ; > COMMIT; > > Is there a step I'm missing? I never had this problem while using sqlite, > only in postgresql. > Any help is very much appreciated. > > > > Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac: > > Every time I edit a model and run syncdb, I get a database error telling > me that the column doesn't exist. > > *#Error Message:* > Environment: > Request Method: GET > Request URL: http://127.0.0.1:8000/tickets/2/ > > Django Version: 1.4 > Python Version: 2.7.3 > Installed Applications: > ('django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'tickets', > 'django.contrib.admin') > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware') > > > Traceback: > File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" > in get_response > 111. response = callback(request, > *callback_args, **callback_kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in view > 48. return self.dispatch(request, *args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in dispatch > 69. return handler(request, *args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get > 98. self.object = self.get_object() > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get_object > 49. obj = queryset.get() > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > get > 361. num = len(clone) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > __len__ > 85. self._result_cache = list(self.iterator()) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > iterator > 291. for row in compiler.results_iter(): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in results_iter > 763. for rows in self.execute_sql(MULTI): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in execute_sql > 818. cursor.execute(sql, params) > File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" > in execute > 40. return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" > > in execute > 52. return self.cursor.execute(query, args) > > Exception Type: DatabaseError at /tickets/2/ > Exception Value: column tickets_ticket.picture does not exist > LINE 1: ...icket"."description", "tickets_ticket"."ranking", "tickets_t... > ^ > I also noticed that when I run syncdb, It tells me that no new objects > were installed. > > But when i do python manage.py sql tickets, I get all my objects. > *#python mange.py sql tickets* > BEGIN; > CREATE TABLE "tickets_ticket" ( > "id" serial NOT NULL PRIMARY KEY, > "title" varchar(100) NOT NULL, > "date_created" timestamp with time zone NOT NULL, > "description" text NOT NULL, > "ranking" integer CHECK ("ranking" >= 0) NOT NULL, > "picture" varchar(100) NOT NULL > ) > ; > COMMIT; > > Is there a step I'm missing? I never had this problem while using sqlite, > only in postgresql. > Any help is very much appreciated. > > > > Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac: > > Every time I edit a model and run syncdb, I get a database error telling > me that the column doesn't exist. > > *#Error Message:* > Environment: > Request Method: GET > Request URL: http://127.0.0.1:8000/tickets/2/ > > Django Version: 1.4 > Python Version: 2.7.3 > Installed Applications: > ('django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'tickets', > 'django.contrib.admin') > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware') > > > Traceback: > File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" > in get_response > 111. response = callback(request, > *callback_args, **callback_kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in view > 48. return self.dispatch(request, *args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in dispatch > 69. return handler(request, *args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get > 98. self.object = self.get_object() > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get_object > 49. obj = queryset.get() > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > get > 361. num = len(clone) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > __len__ > 85. self._result_cache = list(self.iterator()) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > iterator > 291. for row in compiler.results_iter(): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in results_iter > 763. for rows in self.execute_sql(MULTI): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in execute_sql > 818. cursor.execute(sql, params) > File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" > in execute > 40. return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" > > in execute > 52. return self.cursor.execute(query, args) > > Exception Type: DatabaseError at /tickets/2/ > Exception Value: column tickets_ticket.picture does not exist > LINE 1: ...icket"."description", "tickets_ticket"."ranking", "tickets_t... > ^ > I also noticed that when I run syncdb, It tells me that no new objects > were installed. > > But when i do python manage.py sql tickets, I get all my objects. > *#python mange.py sql tickets* > BEGIN; > CREATE TABLE "tickets_ticket" ( > "id" serial NOT NULL PRIMARY KEY, > "title" varchar(100) NOT NULL, > "date_created" timestamp with time zone NOT NULL, > "description" text NOT NULL, > "ranking" integer CHECK ("ranking" >= 0) NOT NULL, > "picture" varchar(100) NOT NULL > ) > ; > COMMIT; > > Is there a step I'm missing? I never had this problem while using sqlite, > only in postgresql. > Any help is very much appreciated. > > > > Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac: > > Every time I edit a model and run syncdb, I get a database error telling > me that the column doesn't exist. > > *#Error Message:* > Environment: > Request Method: GET > Request URL: http://127.0.0.1:8000/tickets/2/ > > Django Version: 1.4 > Python Version: 2.7.3 > Installed Applications: > ('django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'tickets', > 'django.contrib.admin') > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware') > > > Traceback: > File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" > in get_response > 111. response = callback(request, > *callback_args, **callback_kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in view > 48. return self.dispatch(request, *args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" > in dispatch > 69. return handler(request, *args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get > 98. self.object = self.get_object() > File > "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in > get_object > 49. obj = queryset.get() > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > get > 361. num = len(clone) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > __len__ > 85. self._result_cache = list(self.iterator()) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in > iterator > 291. for row in compiler.results_iter(): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in results_iter > 763. for rows in self.execute_sql(MULTI): > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" > in execute_sql > 818. cursor.execute(sql, params) > File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" > in execute > 40. return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py" > > in execute > 52. return self.cursor.execute(query, args) > > Exception Type: DatabaseError at /tickets/2/ > Exception Value: column tickets_ticket.picture does not exist > LINE 1: ...icket"."description", "tickets_ticket"."ranking", "tickets_t... > ^ > I also noticed that when I run syncdb, It tells me that no new objects > were installed. > > But when i do python manage.py sql tickets, I get all my objects. > *#python mange.py sql tickets* > BEGIN; > CREATE TABLE "tickets_ticket" ( > "id" serial NOT NULL PRIMARY KEY, > "title" varchar(100) NOT NULL, > "date_created" timestamp with time zone NOT NULL, > "description" text NOT NULL, > "ranking" integer CHECK ("ranking" >= 0) NOT NULL, > "picture" varchar(100) NOT NULL > ) > ; > COMMIT; > > Is there a step I'm missing? I never had this problem while using sqlite, > only in postgresql. > Any help is very much appreciated. > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/RbI1AXJTfPIJ. To post to this group, send email to django-users@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.