Add _messages template to hosting/settings.html

This commit is contained in:
PCoder 2017-10-21 17:02:24 +02:00
parent 70b6bbdf2f
commit be8181ec42
2 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@
{% block content %}
<div class="dashboard-container wide">
{% include 'hosting/includes/_messages.html' %}
<div class="dashboard-container-head">
<h1 class="dashboard-title-thin"><img src="{% static 'hosting/img/dashboard_settings.svg' %}" class="un-icon wide"> {% trans "My Settings" %}</h1>
</div>

View File

@ -635,6 +635,10 @@ class SettingsView(LoginRequiredMixin, FormView):
exp_year=card_details_response['exp_year'],
card_id=card_details_response['card_id']
)
msg = _(
"Successfully associated the card with your account"
)
messages.add_message(request, messages.SUCCESS, msg)
return self.render_to_response(self.get_context_data())
else:
return self.form_invalid(form)