TGTGInsighttelegram intelligenceLIVE / telegram public index
Back to channels
djangoproject avatar

TGINSIGHT CHAT

djangoproject

@djangoproject

Technologies

connect with us: @XtakjoyX

Subscribers156Current channel subscribers
Tracked posts592Indexed post count
Recent reach392Sum of recent post views
Recent posts

Recent posts

Tag: #save · 2 posts

当前筛选 #save清除筛选

Posted Aug 30

How #Django knows to #UPDATE vs. #INSERT when you call #save (), #Django follows this algorithm: If the object’s primary key attribute is set to a value that evaluates to True (i.e., a value other than None or the empty string), Django executes an UPDATE. If the object’s primary key attribute is not set or if the UPDATE didn’t update anything, Django executes an INSERT.

210 views

Posted Aug 30

What happens when you #save within #django? 1- Emit a pre-save signal. 2- Preprocess the data. 3- Prepare the data for the database. 4- Insert the data into the database. 5- Emit a post-save signal.

182 views

Hashtags