1 from random
import random
3 from couchdbkit
.ext
.django
.schema
import *
5 from mygpo
.core
.proxy
import DocumentABCMeta
6 from mygpo
.users
.models
import RatingMixin
10 class PodcastList(Document
, RatingMixin
):
11 """ A list of Podcasts that a user creates for the purpose of sharing """
13 __metaclass__
= DocumentABCMeta
15 title
= StringProperty(required
=True)
16 slug
= StringProperty(required
=True)
17 podcasts
= StringListProperty()
18 user
= StringProperty(required
=True)
19 random_key
= FloatProperty(default
=random
)
23 return '<{cls} "{title}" by {user}>'.format(
24 cls
=self
.__class
__.__name
__, title
=self
.title
, user
=self
.user
)