summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2015-07-22 15:38:20 +0200
committerMagnus Granberg <zorry@gentoo.org>2015-07-22 15:38:20 +0200
commit539bfb87b96725eb415f6b8afb5262b87b8828d7 (patch)
treea4fea51da5ad2f25de236a575f935f6040efc07c
parentadd package and new to menu (diff)
downloadtinderbox-cluster-www-539bfb87b96725eb415f6b8afb5262b87b8828d7.tar.gz
tinderbox-cluster-www-539bfb87b96725eb415f6b8afb5262b87b8828d7.tar.bz2
tinderbox-cluster-www-539bfb87b96725eb415f6b8afb5262b87b8828d7.zip
include all repos in packages
-rw-r--r--python/tbc_www/views.py10
-rw-r--r--python/templates/pages/packages/ebuilds/index.html16
2 files changed, 14 insertions, 12 deletions
diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py
index 252998e..a025cbf 100644
--- a/python/tbc_www/views.py
+++ b/python/tbc_www/views.py
@@ -95,8 +95,8 @@ def packages(request, category_id):
adict['Descriptions'] = PM.Descriptions
adict['Changlog'] =PM.Changlog
ebuilds = []
- for E in Ebuilds.objects.filter(Active = True).filter(PackageId_id = PM.PackageId.PackageId):
- ebuilds.append(E.Version + '::' + E.PackageId.RepoId.Repo + '\n')
+ for E in Ebuilds.objects.filter(Active = True).filter(PackageId__Package = PM.PackageId.Package):
+ ebuilds.append(E.Version + '::' + E.PackageId.RepoId.Repo + '\n')
adict['Ebuilds'] = ebuilds
adict2[PM.PackageId.Package] = adict
TmpDict['PM_tmp'] = adict2
@@ -106,8 +106,10 @@ def packages(request, category_id):
def ebuilds(request, package_id):
pagerequest = 'packages'
TmpDict = default_TmpDict(pagerequest)
- TmpDict['EB_tmp'] = Ebuilds.objects.filter(PackageId_id = package_id)
- TmpDict['P'] = get_object_or_404(Packages, PackageId = package_id)
+ P = get_object_or_404(Packages, PackageId = package_id)
+ TmpDict['P'] = P
+ TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.Package)
+ print(TmpDict)
return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict)
def new(request):
diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html
index a5ed0d6..73f45f2 100644
--- a/python/templates/pages/packages/ebuilds/index.html
+++ b/python/templates/pages/packages/ebuilds/index.html
@@ -4,14 +4,14 @@
<div class="col-xs-12 col-md-6">
<h2>{{ P.CategoryId.Category }}/{{ P.Package }}</h2>
<table class="table table-striped frontpage-table">
- {% for E in EB_tmp %}
- <tr>
- <td class="frontpage-table-package-atom">
- <a href="/ebuild/{{ E.EbuildId }}/" title="{{ P.CategoryId.Category }}/{{ P.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}">{{ P.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}</a></td>
- <td><p></p></td>
- </tr>
- {% endfor %}
-</table>
+ {% for E in EM_tmp %}
+ <tr>
+ <td class="frontpage-table-package-atom">
+ <a href="/ebuild/{{ E.EbuildId.EbuildId }}/" title="{{ P.CategoryId.Category }}/{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}">{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}</a></td>
+ <td><p></p></td>
+ </tr>
+ {% endfor %}
+ </table>
</div>
</div>
{% endblock %} \ No newline at end of file