0

I am using Zinnia Blog module with my Django app. I have a Django app and have a custom User model. I have added the following setting:

AUTH_USER_MODEL = 'account.Member'

However, when I try to create a new entry in the blog I get the Foreign Key constraint error.

Exception Type: IntegrityError
Exception Value:    
(1452, 'Cannot add or update a child row: a foreign key constraint fails (`example`.`zinnia_entry_authors`, CONSTRAINT `author_id_refs_id_410656e2874b02ff` FOREIGN KEY (`author_id`) REFERENCES `auth_user` (`id`))')

It references the default auth model (which doesn't exist in the database) instead of the specified auth model. How do make Zinnia use the correct table.

Thanks.

4

0 回答 0