Stan Reduta
Stan Reduta

Reputation: 3492

Automatically call method after data is added to Django DB

After adding data to a certain table in DB through Django admin I want a method to be called automatically to process this data (before or after it was added to DB) and save the output in a different table, so that when user logs in the view doesn't have to wait for processing of that data and only query a table for prepared output.

Is there a handler/method that allows me to hook up to data being added to DB?

Upvotes: 2

Views: 187

Answers (1)

d2718nis
d2718nis

Reputation: 1269

Check out the pre_save and the post_save signals.

Upvotes: 2

Related Questions