diff options
Diffstat (limited to 'python/tbc_www/views.py')
-rw-r--r-- | python/tbc_www/views.py | 10 |
1 files changed, 6 insertions, 4 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): |