fix: user on distant server
This commit is contained in:
parent
0c98da1ce7
commit
90e3e71d3c
@ -1,22 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-05-02 14:32
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('djangoldp_notification', '0004_auto_20190425_1141'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='notification',
|
||||
name='author_user',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
@ -79,7 +79,8 @@ def send_email_on_notification(sender, instance, **kwargs):
|
||||
'email.html',
|
||||
{
|
||||
'on': settings.JABBER_DEFAULT_HOST,
|
||||
'instance': instance
|
||||
'instance': instance,
|
||||
'author': requests.get(instance.author).json()['name'] or 'Unknown user'
|
||||
}
|
||||
)
|
||||
send_mail(
|
||||
|
@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<p style='font-style:italic;color:#777'>A new {{ instance.type }} from <b>{{ instance.author_user.name }}</b> on {{ on }}</p>
|
||||
<p style='font-style:italic;color:#777'>A new {{ instance.type }} from <b>{{ author }}</b> on {{ on }}</p>
|
||||
<p>{{ instance.summary }}</p>
|
||||
</div>
|
||||
<div style='margin-top:10px;'>
|
||||
|
Loading…
Reference in New Issue
Block a user