Hi Christophe, On Tue, 02 Dec 2014, Christophe Siraut wrote: > Here is a patchset implementing half of this feature, I have not > yet figured out how to feed the long description in the tracker.
Can you be more explicit at where you're stuck? A quick look led me to distro_tracker.core.utils.packages.extract_information_from_packages_entry() to fix to inject the long description too. That said I'm not sure how to retrieve the long description from the "stanza" variable. A dump of the variable will hopefully give you the answer ? (otherwise it might be documented in the python-apt doc?) A few comments on your patch. It looks mostly good though: > Subject: [PATCH 5/6] core/models: Add long description as a tooltip on top of > the short description (2/3) > > --- a/distro_tracker/core/models.py > +++ b/distro_tracker/core/models.py > @@ -472,6 +472,26 @@ class SourcePackageName(PackageName): > > return '' > > + def long_description(self): > + """ > + Returns the most recent long description for a source package. If > there > + is a binary package whose name matches the source package, its > + description will be used. If not, the long description for the first > + binary package will be used. > + """ This comment is not accurate. The fallback is to use the description of the "only" package if there's only one package. There's no notion of the first package any more. Since the mistake probably comes from copy/paste, you should fix the original comment too :-) > From 779365b63bdb397951f5bbe59197c501a6f6ca0e Mon Sep 17 00:00:00 2001 > From: Christophe Siraut <d...@tobald.eu.org> > Date: Tue, 2 Dec 2014 12:37:52 +0100 > Subject: [PATCH 6/6] core/templates: Add long description as a tooltip on top > of the short description (3/3) > > --- > distro_tracker/core/templates/core/package.html | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/distro_tracker/core/templates/core/package.html > b/distro_tracker/core/templates/core/package.html > index 672f7d7..78d31b9 100644 > --- a/distro_tracker/core/templates/core/package.html > +++ b/distro_tracker/core/templates/core/package.html > @@ -16,7 +16,7 @@ > </div> > <div class="span6 col col-lg-6 text-center"> > <h1>{{ package }}</h1> > - <h4>{{ package.short_description }}{% if not > package.short_description %} {% endif %}</h4> > + <h4 title="{{ package.long_description }}">{{ > package.short_description }}{% if not package.short_description %} {% > endif %}</h4> Don't we need something to encode quotes to avoid broken HTML if the long description contains double quotes? Or is this already taken care of by Django? Cheers, -- Raphaël Hertzog ◈ Debian Developer Support Debian LTS: http://www.freexian.com/services/debian-lts.html Learn to master Debian: http://debian-handbook.info/get/ -- To UNSUBSCRIBE, email to debian-qa-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141202134239.ga7...@home.ouaza.com