Simon Willison's Weblog

Subscribe

How can I detect manual record insert from mysql cansole into my code in django .?

28th December 2012

My answer to How can I detect manual record insert from mysql cansole into my code in django .? on Quora

You can't. The best you can do is have Django periodically poll MySQL to see if anything has changed (maybe with a custom management command run by cron)--having a TIMESTAMP field on every table which will be automatically set to the current time when a record is inserted will help you spot things that have changed.

Posted 28th December 2012 at 2:31 pm * Follow me on Mastodon, Bluesky, Twitter or subscribe to my newsletter

More recent articles

This is How can I detect manual record insert from mysql cansole into my code in django .? by Simon Willison, posted on 28th December 2012.

django 583 mysql 81 web-development 169 quora 1005

Next: What are some useful techniques and tricks using list comprehension?

Previous: Why do so many newspapers have astrology columns?

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe