17 lines
612 B
Python
17 lines
612 B
Python
def send_request(target, object_iri, instance, created):
|
|
ActivityQueueService.send_activity(target, json)
|
|
|
|
class VAPIDKeyset(models.Model):
|
|
public_key = models.BinaryField(max_length=87)
|
|
private_key = models.BinaryField(max_length=43)
|
|
|
|
def __str__(self):
|
|
return "public_key:{}... private_key:{}...".format(
|
|
self.public_key.tobytes()[:10],
|
|
self.private_key.tobytes()[:10]
|
|
)
|
|
|
|
@receiver(post_save, sender=Notification)
|
|
def send_email_on_notification(sender, instance, created, **kwargs):
|
|
if created and instance.summary and getattr(settings,'JABBER_DEFAULT_HOST',False) and instance.user.email:
|