[Answered ]-ProgrammingError: column specified more than once

2👍

When you specify a ForeignKey field, Behind the scenes, Django appends "_id" to the field name to create its database column name.

In this case, your field target_content_type which is a ForeignKey, would correspond to the database column target_content_type_id, which is conflicting with your charfield.

Rename your target_content_type_id to something else like target_content_type_object_id or something unique.

Here is the documentation of ForeignKey and more specifically on Database Representation

Leave a comment