Hi,

I have a 'Product' model that has the following list_display

list_display = ('title','category','price_adjusted', 'on_sale',
'featured', 'visible')

'price_adjusted' is the following method

def price_adjusted(self):
                if self.on_sale:
                        return self.sale_price
                else:
                        return self.price

which works fine and returns the sale price if 'on_sale' is true,
however you lose the ability to sort that column. Is there a way to
have a custom column with sorting?

thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to