From b284ed70a663193dce09a8324d06d537eb7a8c37 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 26 Dec 2019 13:56:31 +0530 Subject: [PATCH] Show error elegantly --- hosting/templates/hosting/includes/_messages.html | 2 +- hosting/views.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hosting/templates/hosting/includes/_messages.html b/hosting/templates/hosting/includes/_messages.html index 12540558..e9a3e681 100644 --- a/hosting/templates/hosting/includes/_messages.html +++ b/hosting/templates/hosting/includes/_messages.html @@ -1,7 +1,7 @@ {% if messages %} {% endif %} \ No newline at end of file diff --git a/hosting/views.py b/hosting/views.py index e88e0f2a..aeca6ada 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -642,7 +642,8 @@ class SettingsView(LoginRequiredMixin, FormView): ) if 'error' in validate_result and validate_result['error']: messages.add_message( - request, messages.ERROR, validate_result["error"], + request, messages.ERROR, + "VAT Number validation error: %s" % validate_result["error"], extra_tags='vat_error' ) else: