Skip to content

Instantly share code, notes, and snippets.

@bryanhelmig
Created September 14, 2012 06:18
Show Gist options
  • Save bryanhelmig/3720156 to your computer and use it in GitHub Desktop.
Save bryanhelmig/3720156 to your computer and use it in GitHub Desktop.
class AnnotateManager(models.Manager):
def get_query_set(self):
return super(AnnotateManager, self).get_query_set()\
.extra(select={'has_prefill': 'ISNULL(prefill)'})\
.order_by('-has_prefill', '-required', 'id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment