-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3.1.0 #6
base: master
Are you sure you want to change the base?
Conversation
if isinstance(e, AccessTokenRefreshError): | ||
error += _(' Try to <a href="%s">revoke and grant access</a> again') % reverse('jet-dashboard:update_module', kwargs={'pk': self.model.pk}) | ||
error += _(' Try to <a href="%s">revoke and grant access</a> again') % reverse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These too needs to use .format
instead
return False | ||
elif self.counter is None: | ||
self.error = mark_safe(_('Please <a href="%s">select Google Analytics counter</a> to start using widget') % reverse('jet-dashboard:update_module', kwargs={'pk': self.model.pk})) | ||
self.error = mark_safe( | ||
_('Please <a href="%s">select Google Analytics counter</a> to start using widget') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These too needs to use .format
instead
group = "day" | ||
return self.api_request( | ||
"stat/traffic/summary.json?id=%s&date1=%s&date2=%s&group=%s" | ||
% (counter, date1.strftime("%Y%m%d"), date2.strftime("%Y%m%d"), group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too .format
needs to be used
self.set_counter_choices(module) | ||
|
||
def set_counter_choices(self, module): | ||
counters = module.counters() | ||
if counters is not None: | ||
self.fields['counter'].choices = (('', '-- %s --' % force_str(_('none'))),) | ||
self.fields['counter'].choices.extend(map(lambda x: (x['id'], x['site']), counters)) | ||
self.fields["counter"].choices = (("", "-- %s --" % force_str(_("none"))),) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too .format
or f
'<a href="%s">attach Yandex account and choose Yandex Metrika counter</a> ' | ||
"to start using widget" | ||
) | ||
% reverse("jet-dashboard:update_module", kwargs={"pk": self.model.pk}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too .format
self.stdout.write(' ]),') | ||
self.stdout.write(" ('%s', [" % app_label) | ||
for model in app["models"]: | ||
self.stdout.write(" '%s'," % model["object_name"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too .format
or f
self.stdout.write(' {\'app_label\': \'%s\', \'items\': [' % ( | ||
app['app_label'] | ||
)) | ||
self.stdout.write(" {'app_label': '%s', 'items': [" % (app["app_label"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too .format
or f
model['name'] | ||
)) | ||
for model in app["models"]: | ||
self.stdout.write(" {'name': '%s'}," % (model["name"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here too .format
or f
@@ -21,8 +21,8 @@ class SearchableTestModel(models.Model): | |||
field2 = models.IntegerField() | |||
|
|||
def __str__(self): | |||
return '%s%d' % (self.field1, self.field2) | |||
return "%s%d" % (self.field1, self.field2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too .format
or f
field2 = 2 | ||
pinned_application = TestModel.objects.create(field1=field1, field2=field2) | ||
self.assertEqual(get_model_instance_label(pinned_application), '%s%d' % (field1, field2)) | ||
self.assertEqual(get_model_instance_label(pinned_application), "%s%d" % (field1, field2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too .format
or f
No description provided.