Added base_url and fixed new account emails
This commit is contained in:
parent
ca73e1bb33
commit
0e5a27862a
3 changed files with 13 additions and 7 deletions
|
@ -10,13 +10,15 @@ 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/>
|
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/>
|
to activate your Data Center Light account.<br/>
|
||||||
{{base_url}}{{activation_link}}
|
{{base_url}}{{activation_link}}
|
||||||
|
{% endblocktrans %}
|
||||||
{% if account_details %}
|
{% if account_details %}
|
||||||
|
{% url 'hosting:reset_password' as reset_password_url %}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Your account details are as follows:<br/><br/>
|
{% blocktrans %}Your account details are as follows:<br/><br/>
|
||||||
Username : Your email address<br/>
|
Username : Your email address<br/>
|
||||||
Password : {{account_details}}<br/><br/>
|
Password : {{account_details}}<br/><br/>
|
||||||
You can reset your password here:
|
You can reset your password here:
|
||||||
{% url 'hosting:reset_password' %}
|
{{base_url}}{{reset_password_url}}
|
||||||
{% endif %}
|
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -6,14 +6,16 @@
|
||||||
You can also copy and paste the following link into the address bar of your browser
|
You can also copy and paste the following link into the address bar of your browser
|
||||||
to activate your Data Center Light account.
|
to activate your Data Center Light account.
|
||||||
{{base_url}}{{activation_link}}
|
{{base_url}}{{activation_link}}
|
||||||
|
{% endblocktrans %}
|
||||||
{% if account_details %}
|
{% if account_details %}
|
||||||
Your account details are as follows:
|
{% url 'hosting:reset_password' as reset_password_url %}
|
||||||
|
{% blocktrans %}Your account details are as follows:
|
||||||
|
|
||||||
Username : Your email address
|
Username : Your email address
|
||||||
Password : {{account_details}}
|
Password : {{account_details}}
|
||||||
|
|
||||||
You can reset your password here:
|
You can reset your password here:
|
||||||
{% url 'hosting:reset_password' %}
|
{{base_url}}{{reset_password_url}}
|
||||||
{% endif %}
|
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -591,10 +591,12 @@ class OrderConfirmationView(DetailView):
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Customer {} does not exist.".format(user.get('email')))
|
"Customer {} does not exist.".format(user.get('email')))
|
||||||
password = CustomUser.get_random_password()
|
password = CustomUser.get_random_password()
|
||||||
|
base_url = "{0}://{1}".format(self.request.scheme,
|
||||||
|
self.request.get_host())
|
||||||
custom_user = CustomUser.register(
|
custom_user = CustomUser.register(
|
||||||
user.get('name'), password,
|
user.get('name'), password,
|
||||||
user.get('email'),
|
user.get('email'),
|
||||||
app='dcl', base_url=None, send_email=True,
|
app='dcl', base_url=base_url, send_email=True,
|
||||||
account_details=password
|
account_details=password
|
||||||
)
|
)
|
||||||
logger.debug("Created user {}.".format(user.get('email')))
|
logger.debug("Created user {}.".format(user.get('email')))
|
||||||
|
|
Loading…
Reference in a new issue