>
> How about adding a method to your Video model?
>
> Video model:
> def get_rating_stars(self):
>      return "***" # Implementation left as an exercise for the reader ;-)
>
This isn't much of an exercise, although it may not be immediately
obvious to the noobi.

def get_rating_stars(self):
    return "*" * self.rating

Isn't python great! :-D Alternatively, you may want to create your own
custom template tag which alternatively returns plan text or an image
(or series of images). Actually, I'm surprised nothing like that has
appeared in the wiki[1] yet.

[1] http://code.djangoproject.com/wiki/CookBookTemplateTags


-- 
----
Waylan Limberg
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to