diff --git a/api/emailing.py b/api/emailing.py index c97f240..3b784d6 100644 --- a/api/emailing.py +++ b/api/emailing.py @@ -1,16 +1,19 @@ -from django.core.mail import send_mail - - -def send_invitation(email, activation_code): - send_mail( - subject='[Invitation] Rethink the way you play table football!', - message=''' - Hi! - You have been invited to TFoosball. Join us here: https://tfoosball.herokuapp.com/accept/{0}/ - The service is not active yet, thank you for your patience. - '''.format(activation_code), - # html_message='Here is the message.', - from_email='tfoosball@piotrstaniow.pl', - recipient_list=[email], - fail_silently=False, - ) +from django.core.mail import send_mail + + +def send_invitation(email, activation_code): + send_mail( + subject='[Invitation] Rethink the way you play table football!', + message=''' + Hi! + + You have been invited to TFoosball. Join us here: https://tfoosball.herokuapp.com/accept/{0}/ + + Best regards, + TFoosball Team + '''.format(activation_code), + # html_message='Here is the message.', + from_email='tfoosball@piotrstaniow.pl', + recipient_list=[email], + fail_silently=False, + ) diff --git a/api/serializers.py b/api/serializers.py index 371652f..23ecbe6 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -41,10 +41,10 @@ class MemberSerializer(serializers.ModelSerializer): att_ratio = serializers.SerializerMethodField() def_ratio = serializers.SerializerMethodField() win_ratio = serializers.SerializerMethodField() - email = serializers.CharField(source='player.email', read_only=True) # TODO Consider nested serializer - first_name = serializers.CharField(source='player.first_name') - last_name = serializers.CharField(source='player.last_name') + email = serializers.CharField(source='player.email', read_only=True) + first_name = serializers.CharField(source='player.first_name', default='') + last_name = serializers.CharField(source='player.last_name', default='') whats_new_version = serializers.IntegerField(source='player.whats_new_version', read_only=True) default_team = serializers.IntegerField(source='player.default_team.pk', default=-1) user_id = serializers.IntegerField(source='player.pk', read_only=True) diff --git a/templates/callback.html b/templates/callback.html index d959aba..e154340 100644 --- a/templates/callback.html +++ b/templates/callback.html @@ -14,7 +14,7 @@ 'FRONTEND_CLIENT': '{{ FRONTEND_CLIENT }}', } - +
diff --git a/templates/index.html b/templates/index.html index a04c59a..dd064d0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,7 +8,7 @@ -Carefully crafted by Piotr StaniĆ³w