model delete django primary key code example
Example 1: delete model object django
SomeModel.objects.filter(id=id).delete()
Example 2: model object means in django
CREATE TABLE myapp_person (
"id" serial NOT NULL PRIMARY KEY,
"first_name" varchar(30) NOT NULL,
"last_name" varchar(30) NOT NULL
);
Example 3: create django object
Author.objects.create(name="Joe")