[yocto] [error-report-web][PATCH] error-details: pull Bugzilla URL from project settings

Kyle Russell bkylerussell at gmail.com
Thu Mar 29 13:28:34 PDT 2018


Signed-off-by: Kyle Russell <bkylerussell at gmail.com>
---
 Post/views.py                | 2 +-
 project/settings.py          | 2 ++
 templates/error-details.html | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Post/views.py b/Post/views.py
index 7f2cffb..c093e7b 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -260,7 +260,7 @@ def details(request, fail_id):
     except ObjectDoesNotExist:
       build_failure = None
 
-    context = {'detail' : build_failure, 'error_types' : ErrorType }
+    context = {'detail' : build_failure, 'error_types' : ErrorType, 'bugzilla_url' : settings.BUGZILLA_URL }
 
     return render(request, "error-details.html", context)
 
diff --git a/project/settings.py b/project/settings.py
index 3c6c87e..ca6f7fb 100644
--- a/project/settings.py
+++ b/project/settings.py
@@ -195,6 +195,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
 
 AUTH_PROFILE_MODULE = 'registration.RegistrationProfile'
 
+BUGZILLA_URL = 'https://bugzilla.yoctoproject.org'
+
 ACCOUNT_ACTIVATION_DAYS = 2
 EMAIL_HOST = 'localhost'
 DEFAULT_FROM_EMAIL = 'noreply at example.com'
diff --git a/templates/error-details.html b/templates/error-details.html
index c30160d..35bf0aa 100644
--- a/templates/error-details.html
+++ b/templates/error-details.html
@@ -83,7 +83,7 @@
 
       </dl>
       <div>
-        <a class="btn btn-block" target="_blank" href="https://bugzilla.yoctoproject.org/enter_bug.cgi?classification=__all" >Open a bug</a>
+        <a class="btn btn-block" target="_blank" href="{{bugzilla_url}}/enter_bug.cgi?classification=__all" >Open a bug</a>
       </div>
     </div>
   </div>
-- 
2.7.4




More information about the yocto mailing list