def resourcebase_post_save(instance, *args, **kwargs):
 if (not instance.id):
  return
 ResourceBase.objects.filter(id=instance.id).update(thumbnail_url=instance.get_thumbnail_url(), detail_url=instance.get_absolute_url(), csw_insert_date=datetime.datetime.now())
 instance.set_missing_info()
 for link in instance.link_set.all():
  if (link.name == 'External Document'):
   if (link.resource.doc_url != link.url):
    link.delete()
  elif (urlsplit(settings.SITEURL).hostname not in link.url):
   link.delete()

def resourcebase_post_save ( instance , * args , ** kwargs ) : if ( not instance . id ) : return ResourceBase . objects . filter ( id = instance . id ) . update ( thumbnail_url = instance . get_thumbnail_url ( ) , detail_url = instance . get_absolute_url ( ) , csw_insert_date = datetime . datetime . now ( ) ) instance . set_missing_info ( ) for link in instance . link_set . all ( ) : if ( link . name == 'External Document' ) : if ( link . resource . doc_url != link . url ) : link . delete ( ) elif ( urlsplit ( settings . SITEURL ) . hostname not in link . url ) : link . delete ( )
used to fill any additional fields after the save .