Collections are curated ordered groupings of arbitrary models.
CharField with max_length 255
Returns the number of items in the collection.
The collection member model represents a generic link from a Collection to an arbitrary model instance with an attached order.
The numerical index of the item within the collection (optional).
GenericForeignKey to an arbitrary model instance.
Given a model class or instance, returns a queryset of all instances of that model which have collection members in this manager’s scope.
>>> from philo.models import Collection >>> from django.contrib.auth.models import User >>> collection = Collection.objects.get(name="Foo") >>> collection.members.all() [<CollectionMember: Foo - user1>, <CollectionMember: Foo - user2>, <CollectionMember: Foo - Spam & Eggs>] >>> collection.members.with_model(User) [<User: user1>, <User: user2>]