Use format for strings instead of %.
This commit is contained in:
@@ -39,7 +39,7 @@ class CourseCreator(models.Model):
|
||||
"why course creation access was denied)"))
|
||||
|
||||
def __unicode__(self):
|
||||
return u'%s | %s [%s]' % (self.user, self.state, self.state_changed)
|
||||
return u"{0} | {1} [{2}]".format(self.user, self.state, self.state_changed)
|
||||
|
||||
|
||||
@receiver(post_init, sender=CourseCreator)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="msg">
|
||||
<h2 class="title">${_("Your account is already active")}</h2>
|
||||
<div class="copy">
|
||||
<p>${_("This account, set up using (%(email)s), has already been activated. Please sign in to start working within edX Studio.") % dict(email=user.email)}</p>
|
||||
<p>${_("This account, set up using {0}, has already been activated. Please sign in to start working within edX Studio.".format(user.email))}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<article class="content-primary" role="main">
|
||||
|
||||
<div class="introduction">
|
||||
<h2 class="title">${_("Welcome, %(name)s!") % dict(name= user.username)}</h2>
|
||||
<h2 class="title">${_("Welcome, {0}!".format(user.username))}</h2>
|
||||
|
||||
%if len(courses) > 0:
|
||||
<div class="copy">
|
||||
|
||||
Reference in New Issue
Block a user