Add host from settings
This commit is contained in:
parent
9fc9fd4cce
commit
efb334ebc4
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user