2π
β
-
Connect a function to post_save signal
-
For every value in
instance.__dict__
, check for presence of a url -
If a url is present, send an email or do what you want
For example:
from django.db.models import signals
def check_for_url(sender, instance, created, kwargs**):
for value in instance.__dict__.values():
if 'http://' in value:
# do want you want
post_save.connect(check_for_url)
Since your question isnβt precise, that should give you some starters, you should of course refine it according to your specific needs.
π€jpic
Source:stackexchange.com