Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sort by new sortable name. For #84

  • Loading branch information...
commit dc09a4b3a1043259200f1b4209a563d15a90ba01 1 parent 66d7dbd
@palewire palewire authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 archive/models.py
View
6 archive/models.py
@@ -15,9 +15,9 @@ class Site(models.Model):
"""
A news website included in the archive.
"""
- name = models.CharField('The formal name of the site that will display \
+ name = models.CharField(help_text='The formal name of the site that will display \
for users', max_length=150)
- sortable_name = models.CharField('The version of the name used for sorting',
+ sortable_name = models.CharField(help_text='The version of the name used for sorting',
max_length=150, blank=True)
slug = models.SlugField(unique=True)
url = models.URLField()
@@ -38,7 +38,7 @@ class Site(models.Model):
tags = TaggableManager(blank=True)
class Meta:
- ordering = ('name',)
+ ordering = ('sortable_name', 'name',)
def __unicode__(self):
return self.name
Please sign in to comment.
Something went wrong with that request. Please try again.