[Fixed]-Receiving "NOT NULL constraint failed: home_page._order" error in Django model

1👍

It looks as if your ForeignKey used order_with_respect_to at one point, which adds an _order field to your model.

Now that you have removed order_with_respect_to, you need to remove the field from your database. Hopefully, creating a new migration and migrating will fix the problem.

Leave a comment