shivankgtm

1,207
reputation
1
9
20

I work as a Backend Engineer in Jaipur, India. I mostly code in Python. I can be reached out on twitter @shivankgtm

  1. 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.
  2. 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.

  1. Remove the word at left in terminal: ctrl + w
  2. Get the absolute path of a file in terminal: readlink -f file_name: link