Created
March 6, 2011 22:01
-
-
Save qoelet/857742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class CategoryManager(models.Manager): | |
def get_query_set(self): | |
return super(CategoryManager, self).get_query_set().order_by('name') | |
class Sub_CategoryManager(models.Manager): | |
def get_query_set(self): | |
return super(Sub_CategoryManager, self).get_query_set().order_by('parent__name', 'name') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment