How to make a Django model ForeignKey optional

Looks like you need to have both blank=True and null=True to make a ForeignKey optional in a django model

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...