Django-page-cms deployment insert error
-
28-04-2021 - |
Domanda
and thanks for taking the time to read my question.
I am using django 1.3 with postgresql. I have django-page-cms 1.4.5 installed. I added pages to my installed apps, run manage.py syncdb, and manage.py migrate. On my remote dev server, I can navigate the to admin/pages, and get to the add page form. However, when I try to do the insert (submit the form) I get the following error:
IntegrityError: insert or update on table "django_admin_log" violates foreign key constraint
"django_admin_log_content_type_id_fkey"
DETAIL: Key (content_type_id)=(24) is not present in table "django_content_type".
When I do a select on my django_content_type table, there are three rows for pages:
20 | content | pages | content
21 | pagepermission | pages | pagepermission
22 | pagealias | pages | pagealias
I am able to insert pages on my local dev server. And the id for pagealias in my local db django_content_type is 24.
How did this carry over from local to remote? Shouldn't this be taken from the relevant db? How can I fix this?
Remote: ubuntu, Local: win7
Thank you!
Soluzione
I had actually the same problem with two instances of the database on the remote server. Both were cached by the same instance of memcache and this was the problem.
I could fix it by creating separated instances of memcache, restarting the servers and doing a syncdb.