Add host from settings

This commit is contained in:
Matthieu Fesselier 2019-02-21 09:06:37 +07:00
parent 9fc9fd4cce
commit efb334ebc4
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class Subscription(models.Model):
def send_notification(sender, instance, **kwargs):
if (sender != Notification and sender != LogEntry):
threads = []
url = "http://127.0.0.1:8000" + Model.get_absolute_url(instance) + '/' # TODO : get host
url = settings.BASE_URL + Model.get_absolute_url(instance) + '/'
for subscription in Subscription.objects.filter(object=url):
process = Thread(target=send_request, args=[subscription.inbox, url])
process.start()