The font_size shouldn't be 0, ever. Make sure you've restarted your
web server. The font_size is set with this snippet:
                    tag.font_size = i + 1
Where i is the index in a list. So it _can't_ ever be 0 if the code is
properly executing.

My font sizing is done like this:
style="font-size: {{ tag.font_size|sub:1|mult:25|add:100 }}%"
with some reasonable default font-size.

Kellen


On Dec 12, 3:36 pm, "Lic. José M. Rodriguez Bacallao"
<[EMAIL PROTECTED]> wrote:
> ok, it fix the problem of the font_size attr but the distribution of
> values is too spaced. For example, if I got two tags: politics, linux.
> the count for those tags are:
> politics: 6
> linux: 4
>
> when it generate the font_size attr, for "politics" the size is 6 and
> for "linux" the size is 0. It can't be posible.
>
> On Dec 11, 2007 8:48 PM, Kellen <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > There's a bug:
> >http://code.google.com/p/django-tagging/issues/detail?id=54
>
> > For which there is a patch, which changes in tagging/utils.py:
> > -            thresholds = [math.pow(max_weight - min_weight + 1,
> > float(i) / float(steps)) \
> > +            thresholds = [min_weight + math.pow(max_weight -
> > min_weight, float(i) / float(steps)) \
>
> > On Dec 11, 10:00 pm, "Lic. José M. Rodriguez Bacallao"
> > <[EMAIL PROTECTED]> wrote:
> > > I'm controling the font size with CSS, that is not the problem, the
> > > problem is with the code for tags cloud that it doesn't generate the
> > > font_size attr for some tags.
>
> > > On Dec 11, 2007 3:44 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > > Just control the default font size with a little CSS? (presuming
> > > > you're using this for [X]HTML output)
>
> > > > On Dec 11, 8:26 pm, "Lic. José M. Rodriguez Bacallao"
>
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > hi folks, I need to generate a tags cloud for a model and I'm using
> > > > > the tagging app from google code. I do something like this:
>
> > > > > cloud = Tag.objects.cloud_for_model(NewsEntry, 6)
>
> > > > > and generate the html cloud based in the "font_size" attr from the
> > > > > tags list "cloud". The problem come when I realize that some of the
> > > > > tags in that list (cloud) doesn't contain a "font_size" attr> I was
> > > > > looking inside the code of the tagging app and I saw that when the
> > > > > "count" attr of the tag is less than any of the values of threshold
> > > > > list it doesn't add the "font_size" attr, so, how can I generate the
> > > > > tags cloud?
>
> > > > > --
> > > > > Lic. José M. Rodriguez Bacallao
> > > > > Cupet
> > > > > -----------------------------------------------------------------
> > > > > Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos 
> > > > > lo mismo.
>
> > > > > Recuerda: El arca de Noe fue construida por aficionados, el titanic
> > > > > por profesionales
> > > > > -----------------------------------------------------------------
>
> > > --
> > > Lic. José M. Rodriguez Bacallao
> > > Cupet
> > > -----------------------------------------------------------------
> > > Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo 
> > > mismo.
>
> > > Recuerda: El arca de Noe fue construida por aficionados, el titanic
> > > por profesionales
> > > -----------------------------------------------------------------
>
> --
> Lic. José M. Rodriguez Bacallao
> Cupet
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to