Skip to contentSkip to conversation

error-details: pull Bugzilla URL from project settings

PATCH New Kyle Russell 1 participant 1 message Mar 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 error-details: pull Bugzilla URL from project settings

---
 Post/views.py                | 2 +-
 project/settings.py          | 2 ++
 templates/error-details.html | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
Post/views.py +1 -1
index 7f2cffb..c093e7b 100644
@@ -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)
 
project/settings.py +2 -0
index 3c6c87e..ca6f7fb 100644
@@ -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 = '[email protected]'
templates/error-details.html +1 -1
index c30160d..35bf0aa 100644
@@ -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>
Signature · 1 line
2.7.4