[Answered ]-Django – is there an addon/lib etc that will filter out urls entered?

2πŸ‘

βœ…

  1. Connect a function to post_save signal

  2. For every value in instance.__dict__, check for presence of a url

  3. 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

Leave a comment