Skip to content

Commit

Permalink
Allow unicode in theme names and projects (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwhipp committed Sep 17, 2014
1 parent f125566 commit 06964d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cvs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_context_data(self, **kwargs):

def join_with_and(lst):
if lst[2:]:
return '{0}, and {1}'.format(', '.join(lst[:-1]), lst[-1])
return u'{0}, and {1}'.format(', '.join(lst[:-1]), lst[-1])
elif lst[1:]:
return ' and '.join(lst)
elif lst:
Expand All @@ -55,7 +55,7 @@ def join_with_and(lst):
for context_name, attname, parent_attname in (
('themes', 'cccs_subthemes', 'theme'),
('sectors', 'cccs_subsectors', 'sector')):
context[context_name] = {str(getattr(elt, parent_attname).name)
context[context_name] = {getattr(elt, parent_attname).name
for project in projects
for elt in getattr(project, attname).all()}

Expand Down

0 comments on commit 06964d7

Please sign in to comment.