All of lore.kernel.org
 help / color / mirror / Atom feed
* [error-report-web][PATCH] error-details: pull Bugzilla URL from project settings
@ 2018-03-29 20:28 Kyle Russell
  0 siblings, 0 replies; only message in thread
From: Kyle Russell @ 2018-03-29 20:28 UTC (permalink / raw)
  To: yocto

Signed-off-by: Kyle Russell <bkylerussell@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@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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-29 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 20:28 [error-report-web][PATCH] error-details: pull Bugzilla URL from project settings Kyle Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.