Hi all--
I'd like my categories to be ordered reverse alphabetically, so I've
done the following:
class Category (models.Model):
name = models.CharField(max_length=50)
slug = models.SlugField(prepopulate_from=("name",))
supercategory = models.ManyToManyField(Supercategory, blank=True,
null=True, filter_interface=models.HORIZONTAL)
def __unicode__(self):
return self.name
class Meta:
verbose_name_plural = "Categories"
ordering = ('-name',)
class Admin:
pass
...works fine, but it's not case-insensitive. From what research I've
done, it looks like this is probably a Postgres (my backend database)
locale issue, & fixing it would require me to backup, reinitialize, &
restore my Postgres database.
Please, someone, tell me there's an easier way...?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---