Implement a 'collections' parameter, aka django-positions
django-positions has the concept of 'collections'. An item is ranked according to its position, but only against other members of its collection. Something similar could be implemented for this, such that an item can be featured within a 'collection'.
An example use case would be one featured item per category, or per author.
class Story(models.Model): title = models.CharField(max_length=255) body = models.TextField(max_length=255)
author = models.ForeignKey('auth.User') site_feature = FeatureField() author_feature = FeatureField(collection='author')
def my_best_story(request): me = request.user my_best_story = Story.objects.get(author=me, author_feature=True)
def my_best_story(request): me = request.user my_best_story = me.story_set.filter(author_featue=True)