Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

V3.1.0 #6

wants to merge 5 commits into from

Conversation

aqeelat
Copy link

@aqeelat aqeelat commented Jul 18, 2023

No description provided.

@aqeelat aqeelat self-assigned this Jul 18, 2023
@aqeelat aqeelat requested a review from baraa-Aljabali July 18, 2023 08:12
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(
Copy link
Collaborator

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')
Copy link
Collaborator

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)
Copy link
Collaborator

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"))),)
Copy link
Collaborator

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})
Copy link
Collaborator

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"])
Copy link
Collaborator

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"]))
Copy link
Collaborator

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"]))
Copy link
Collaborator

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)
Copy link
Collaborator

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))
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants