I work as a Backend Engineer in Jaipur, India. I mostly code in Python. I can be reached out on twitter @shivankgtm
- Avoid using ManyToMany relationship in django, instead create a mapping table having two foreign keys with different models to handle your use case(that's what django does in background). it ll be more visible and accessible to you.
- While using django's
update_or_create
method, make sure the query Should have only single instance for Model. It will throw error if There would be more then one instances of arguments in Model class.
Below are the some productivity hacks.