From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SnxZc-0004iV-Cl for garchives@archives.gentoo.org; Sun, 08 Jul 2012 19:55:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7284BE0466; Sun, 8 Jul 2012 19:54:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2CFB2E0466 for ; Sun, 8 Jul 2012 19:54:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3CFBA1B4025 for ; Sun, 8 Jul 2012 19:54:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D0495E5442 for ; Sun, 8 Jul 2012 19:54:45 +0000 (UTC) From: "Slava Bacherikov" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Slava Bacherikov" Message-ID: <1341769265.37aabe5a0fd8a9228f325bac4a86cc203d919d7a.bacher09@gentoo> Subject: [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/, gpackages/templates/ X-VCS-Repository: proj/gentoo-packages X-VCS-Files: gpackages/apps/packages/urls.py gpackages/apps/packages/views.py gpackages/templates/base.html gpackages/templates/local_use.html X-VCS-Directories: gpackages/apps/packages/ gpackages/templates/ X-VCS-Committer: bacher09 X-VCS-Committer-Name: Slava Bacherikov X-VCS-Revision: 37aabe5a0fd8a9228f325bac4a86cc203d919d7a X-VCS-Branch: master Date: Sun, 8 Jul 2012 19:54:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 50ec5922-3bcc-4e0c-b003-57ad19b568d7 X-Archives-Hash: a2eac69364aba84e426285b8a80e29cd commit: 37aabe5a0fd8a9228f325bac4a86cc203d919d7a Author: Slava Bacherikov bacher09 org> AuthorDate: Sun Jul 8 17:41:05 2012 +0000 Commit: Slava Bacherikov bacherikov org ua> CommitDate: Sun Jul 8 17:41:05 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoo-packag= es.git;a=3Dcommit;h=3D37aabe5a Add local use flags view --- gpackages/apps/packages/urls.py | 4 +++- gpackages/apps/packages/views.py | 11 +++++++++-- gpackages/templates/base.html | 1 + gpackages/templates/local_use.html | 30 ++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/gpackages/apps/packages/urls.py b/gpackages/apps/packages/ur= ls.py index 44b9f96..a8e4cab 100644 --- a/gpackages/apps/packages/urls.py +++ b/gpackages/apps/packages/urls.py @@ -3,12 +3,14 @@ from views import CategoriesListView, HerdsListView, Ma= intainersListView, \ RepositoriesListView, LicenseGroupsView , EbuildsListV= iew, \ PackagesListsView, PackageDetailView, EbuildDetailView= , \ GlobalUseListView, NewsListView, NewsDetailView, \ - LicenseDetailView, ArchChoiceView, LicensesListView + LicenseDetailView, ArchChoiceView, LicensesListView, \ + LocalUseListView =20 urlpatterns =3D patterns('', url(r'^categories/$', CategoriesListView.as_view(), name =3D 'catego= ries'), url(r'^herds/$', HerdsListView.as_view(), name =3D 'herds'), url(r'^use/$', GlobalUseListView.as_view(), name =3D 'global_uses'), + url(r'^local_use/$', LocalUseListView.as_view(), name =3D 'local_use= s'), url(r'^maintainers/$', MaintainersListView.as_view(), name =3D 'main= tainers'), url(r'^repositories/$', RepositoriesListView.as_view(), name =3D 're= positories'), url(r'^license-groups/$', LicenseGroupsView.as_view(), name =3D 'lic= ense_groups'), diff --git a/gpackages/apps/packages/views.py b/gpackages/apps/packages/v= iews.py index a861531..e359bd1 100644 --- a/gpackages/apps/packages/views.py +++ b/gpackages/apps/packages/views.py @@ -3,7 +3,8 @@ from generic.views import ContextListView, ContextTemplat= eView, ContextView, \ MultipleFilterListViewMixin from .models import CategoryModel, HerdsModel, MaintainerModel, \ RepositoryModel, LicenseGroupModel, EbuildModel, \ - PackageModel, UseFlagModel, PortageNewsModel, Licens= eModel + PackageModel, UseFlagModel, PortageNewsModel, \ + UseFlagDescriptionModel, LicenseModel from .forms import ArchChoiceForm =20 from django.shortcuts import get_object_or_404 @@ -164,6 +165,13 @@ class GlobalUseListView(ContextListView): context_object_name =3D 'uses' queryset =3D UseFlagModel.objects.exclude(description =3D '')=20 =20 +class LocalUseListView(ContextListView): + extra_context =3D {'page_name': 'Local Use'} + template_name =3D 'local_use.html' + context_object_name =3D 'uses' + queryset =3D UseFlagDescriptionModel.objects.all().\ + select_related('use_flag', 'package', 'package__category') + class NewsListView(ContextListView): extra_context =3D {'page_name': 'News'} template_name =3D 'portage_news.html' @@ -184,7 +192,6 @@ class LicensesListView(ContextListView): extra_context =3D {'page_name': 'Licens'} template_name =3D 'licenses.html' context_object_name =3D 'licenses' - slug_field =3D 'name' paginate_by =3D 20 queryset =3D LicenseModel.objects.all() =20 diff --git a/gpackages/templates/base.html b/gpackages/templates/base.htm= l index 7fd70f3..2f3c79a 100644 --- a/gpackages/templates/base.html +++ b/gpackages/templates/base.html @@ -113,6 +113,7 @@ {% active_link 'repositories' 'Repositories'= %} {% active_link 'license_groups' 'License Gro= ups' %} {% active_link 'global_uses' 'Global Use Fla= gs' %} + {% active_link 'local_uses' 'Local Use Flags= ' %} {% active_link 'archchoice' 'Select Arches' = %} {% active_link 'licenses' 'Licenses' %} diff --git a/gpackages/templates/local_use.html b/gpackages/templates/loc= al_use.html new file mode 100644 index 0000000..af13bf0 --- /dev/null +++ b/gpackages/templates/local_use.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} +{% load url from future %} + +{% block content %} + + + + + + + + + + + + + + + + {% for use in uses %} + + + + + + {% endfor %} + +
Use flagPackageDescription
{{ use.use_flag.name }}{{ use.package.cp }}{{ use.description }}
+ +{% endblock content %}