if i’m using django, and a user submits, say, a comment to my website – what is the best way (or what ways are there?) to programatically “alert” that a url has been submitted, and then do something to that url?
Either “fix” it so it isn’t clickable, or “flag” it so i review the comment before approving, or emailing me saying “someone submitted a comment” – or, you know what, provide a hook so i can do something?
cheers!
Connect a function to post_save signal
For every value in
instance.__dict__, check for presence of a urlIf a url is present, send an email or do what you want
For example:
Since your question isn’t precise, that should give you some starters, you should of course refine it according to your specific needs.