RPRazyesh Pudasainiinblog.rajeshpudasaini.com.np·Jan 18, 2023 · 1 min readDjango Key (id)=(244584) already exists, Django unique constraint primary keyReplace stock_price with the table name on which you got the unique constraint issues. SELECT MAX(id) FROM stock_price; ALTER SEQUENCE stock_price_id_seq START WITH 245000; ALTER SEQUENCE stock_price_id_seq RESTART;00
RPRazyesh Pudasainiinblog.rajeshpudasaini.com.np·Aug 11, 2021 · 2 min readPython walrus operator is weird...Python walrus operator (:=) was introduced in Python 3.8. This operator helps most of the developers to assign variables in the middle of an expression. Let's have a quick look, how walrus operator comes into hand. def add(x): return x + 1 # ...00