try:
return re.search(r'\w', self.title, re.U).group(0)
except AttributeError:
- return None
+ return ''
def author_str(self):
return ", ".join(str(t) for t in self.tags.filter(category='author'))
try:
return re.search(r'\w', self.title, re.U).group(0)
except AttributeError:
- return None
+ return ''
@models.permalink
def get_absolute_url(self):
elif self.name:
return self.name[0]
else:
- return None
+ return ''
@permalink
def get_absolute_url(self):
@register.inclusion_tag('catalogue/plain_list.html', takes_context=True)
def plain_list(context, object_list, with_initials=True, by_author=False, choice=None, book=None, gallery=False, paged=True):
- names = [(None, [])]
+ names = [('', [])]
last_initial = None
for obj in object_list:
if with_initials: