diff options
author | 2015-07-17 08:20:12 +0200 | |
---|---|---|
committer | 2015-07-17 08:20:12 +0200 | |
commit | 58736e935b2ece00e47cb380481c5a935f340c82 (patch) | |
tree | c886c8cf76464aa8bec696e31f914fe41c529c14 | |
parent | add more info for new build request and new build logs on home (diff) | |
download | tinderbox-cluster-www-58736e935b2ece00e47cb380481c5a935f340c82.tar.gz tinderbox-cluster-www-58736e935b2ece00e47cb380481c5a935f340c82.tar.bz2 tinderbox-cluster-www-58736e935b2ece00e47cb380481c5a935f340c82.zip |
fix a error to display setup/profiles in new build requests in home
-rw-r--r-- | python/tbc_www/models.py | 3 | ||||
-rw-r--r-- | python/tbc_www/views.py | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index fc91a8b..04a3bb8 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -100,6 +100,7 @@ class Configs(models.Model): class BuildJobs(models.Model): BuildJobId = models.AutoField(primary_key=True, db_column='build_job_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + SetupId = models.ForeignKey(Setups, db_column='setup_id') ConfigId = models.ForeignKey(Configs, db_column='config_id') Status = models.CharField(max_length=21, db_column='status') BuildNow = models.BooleanField(db_column='build_now') @@ -108,7 +109,7 @@ class BuildJobs(models.Model): class Meta: db_table = 'build_jobs' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) + return '%s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) class Uses(models.Model): UseId = models.IntegerField(primary_key=True, db_column='use_id') diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 108a653..dcc89d4 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -5,7 +5,7 @@ from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts -from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ +from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ BuildJobsUse import re @@ -42,9 +42,7 @@ def home(request): adict2['P'] = BJ.EbuildId.PackageId.Package adict2['V'] = BJ.EbuildId.Version adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo - adict2['Profile'] = BJ.ConfigId.SetupId.Profile - adict2['Setup'] = BJ.ConfigId.SetupId.Setup - adict2['title'] = "Setup: " + BJ.ConfigId.SetupId.Setup + "\n" + "Profile: " + BJ.ConfigId.SetupId.Profile + "\n" + adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n" BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) if not BJU == []: use_enable = [] |