Remove hard coded references to wger.de in emails

See #291
This commit is contained in:
Roland Geider
2016-09-20 23:28:11 +02:00
parent 0a8caec376
commit 86ee621e46
6 changed files with 14 additions and 16 deletions

View File

@@ -6,4 +6,4 @@ added to workouts. You can access it on this address:{% endblocktrans %}
{{url}}
{% blocktrans %}Thank you for contributing and making this site better!{% endblocktrans %}
— {% blocktrans %}The {{ site_name }} team{% endblocktrans %}
— {% blocktrans %}The {{ site }} team{% endblocktrans %}

View File

@@ -110,11 +110,10 @@ class Command(BaseCommand):
# Compose and send the email
translation.activate(user.userprofile.notification_language.short_name)
context = {}
context['site'] = Site.objects.get_current()
context['workout'] = workout
context['expired'] = True if delta.days < 0 else False
context['days'] = abs(delta.days)
context = {'site': Site.objects.get_current(),
'workout': workout,
'expired': True if delta.days < 0 else False,
'days': abs(delta.days)}
subject = _('Workout will expire soon')
message = loader.render_to_string('workout/email_reminder.tpl', context)

View File

@@ -12,9 +12,9 @@ never produce reminders.{% endblocktrans %}
{% blocktrans %}If you don't want to ever receive email reminders, deactivate the
option in your settings.{% endblocktrans %}
{% trans "the wger.de team" %}
{% blocktrans %}The {{ site }} team{% endblocktrans %}
* https://{{site}}{{workout.get_absolute_url}}
* https://{{site}}{% url 'manager:workout:add' %}
* https://{{site}}{% url 'core:user:preferences' %}
* https://{{site}}{% url 'core:user:preferences' %}

View File

@@ -9,9 +9,9 @@ Please click the link to access the application and enter a new one.{% endblockt
{% blocktrans %}If you don't want to ever receive email reminders, deactivate the
option in your settings.{% endblocktrans %}
{% trans "the wger.de team" %}
{% blocktrans %}The {{ site }} team{% endblocktrans %}
* https://{{site}}{% url 'weight:overview' user.username %}
* https://{{site}}{% url 'weight:add' %}
* https://{{site}}{% url 'core:user:preferences' %}
* https://{{site}}{% url 'core:user:preferences' %}

View File

@@ -6,4 +6,4 @@ added to nutrition plans. You can access it on this address:{% endblocktrans %}
{{url}}
{% blocktrans %}Thank you for contributing and making this site better!{% endblocktrans %}
— {% blocktrans %}The {{ site_name }} team{% endblocktrans %}
— {% blocktrans %}The {{ site }} team{% endblocktrans %}

View File

@@ -69,11 +69,10 @@ class Command(BaseCommand):
# Compose and send the email
translation.activate(user.userprofile.notification_language.short_name)
context = {}
context['site'] = Site.objects.get_current()
context['date'] = last_entry
context['days'] = datediff
context['user'] = user
context = {'site': Site.objects.get_current(),
'date': last_entry,
'days': datediff,
'user': user}
subject = _('You have to enter your weight')
message = loader.render_to_string('workout/email_weight_reminder.tpl', context)