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

in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None #88

Open
Tauhid-Ahmed8009 opened this issue Jul 16, 2023 · 0 comments

Comments

@Tauhid-Ahmed8009
Copy link

Tauhid-Ahmed8009 commented Jul 16, 2023

in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None class CredentialWidget(Widget): module = None def render(self, name, value, attrs=None, renderer=None): if value and len(value) > 0: link = '%s' % ( reverse('jet-dashboard:google-analytics-revoke', kwargs={'pk': self.module.model.pk}), force_str(('Revoke access')) ) else: link = '%s' % ( reverse('jet-dashboard:google-analytics-grant', kwargs={'pk': self.module.model.pk}), force_str(('Grant access')) ) attrs = self.build_attrs({ 'type': 'hidden', 'name': 'credential', }) attrs['value'] = force_unicode(value) if value else '' return format_html('%s<input{} />' % link, flatatt(attrs))

@Tauhid-Ahmed8009 Tauhid-Ahmed8009 changed the title in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None class CredentialWidget(Widget): module = None def render(self, name, value, attrs=None, **renderer=None**): if value and len(value) > 0: link = '<a href="%s">%s</a>' % ( reverse('jet-dashboard:google-analytics-revoke', kwargs={'pk': self.module.model.pk}), force_str(_('Revoke access')) ) else: link = '<a href="%s">%s</a>' % ( reverse('jet-dashboard:google-analytics-grant', kwargs={'pk': self.module.model.pk}), force_str(_('Grant access')) ) attrs = self.build_attrs({ 'type': 'hidden', 'name': 'credential', }) attrs['value'] = force_unicode(value) if value else '' return format_html('%s<input{} />' % link, flatatt(attrs)) Tes Jul 16, 2023
@Tauhid-Ahmed8009 Tauhid-Ahmed8009 changed the title Tes in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None Jul 16, 2023
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

No branches or pull requests

1 participant