Send account details in email

This commit is contained in:
M.Ravi 2017-09-22 12:01:09 +02:00
commit 994ffaf117
4 changed files with 25 additions and 4 deletions

View file

@ -10,5 +10,13 @@ You can activate your Data Center Light account by <a href="{{base_url}}{{activa
You can also copy and paste the following link into the address bar of your browser<br/>
to activate your Data Center Light account.<br/>
{{base_url}}{{activation_link}}
{% if account_details %}
<br/><br/>
Your account details are as follows:<br/><br/>
Username : Your email address<br/>
Password : {{account_details}}<br/><br/>
You can reset your password here:
{% url 'hosting:reset_password' %}
{% endif %}
{% endblocktrans %}
{% endblock %}

View file

@ -6,5 +6,14 @@
You can also copy and paste the following link into the address bar of your browser
to activate your Data Center Light account.
{{base_url}}{{activation_link}}
{% if account_details %}
Your account details are as follows:
Username : Your email address
Password : {{account_details}}
You can reset your password here:
{% url 'hosting:reset_password' %}
{% endif %}
{% endblocktrans %}
{% endblock %}

View file

@ -598,7 +598,8 @@ class OrderConfirmationView(DetailView):
custom_user = CustomUser.register(
user.get('name'), password,
user.get('email'),
app='dcl', base_url=None, send_email=False
app='dcl', base_url=None, send_email=True,
account_details=password
)
logger.debug("Created user {}.".format(user.get('email')))
stripe_customer = StripeCustomer.objects. \