from django.core.files.base import ContentFile
from django.db import models
from django.utils.timezone import utc
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
@staticmethod
def choose_letter(word, continuations):
if word not in continuations:
- return u'\n'
+ return '\n'
choices = sum((continuations[word][letter]
for letter in continuations[word]))
return ''
letters = []
- word = u''
+ word = ''
finished_stanza_verses = 0
current_stanza_verses = 0
word = word[-length + 1:] + letter
char_count += 1
- if letter == u'\n':
+ if letter == '\n':
if verse_start:
finished_stanza_verses += current_stanza_verses
current_stanza_verses = 0