I tried to add a custom attribute to the objects in the query_set of a
custom Manager before returning the query_set but it seems not to
work:

class SongManager(models.Manager):
    def expire(self):
        from boto.s3.connection import S3Connection
        c = S3Connection()
        for song in self.get_query_set():
            song.new_attribute = c.generate_url(expires_in=10000,
key=song.mp3.name, method="GET")
        return self.get_query_set()

In the template {{ song.new_attribute }} returns nothing at all. Any
ideas how to do this?

Thank you.

A Melé
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to