Show redirect URL in <pre> element
This commit is contained in:
parent
1fac964b8b
commit
31846f1d05
|
@ -36,7 +36,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ source.name }}</td>
|
<td>{{ source.name }}</td>
|
||||||
<td>{{ source|fieldtype }}</td>
|
<td>{{ source|fieldtype }}</td>
|
||||||
<td>{{ source.additional_info }}</td>
|
<td>{{ source.additional_info|safe }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-default btn-sm"
|
<a class="btn btn-default btn-sm"
|
||||||
href="{% url 'passbook_admin:source-update' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
|
href="{% url 'passbook_admin:source-update' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
|
||||||
|
|
|
@ -29,14 +29,13 @@ class OAuthSource(Source):
|
||||||
def get_login_button(self):
|
def get_login_button(self):
|
||||||
url = reverse_lazy('passbook_oauth_client:oauth-client-login',
|
url = reverse_lazy('passbook_oauth_client:oauth-client-login',
|
||||||
kwargs={'source_slug': self.slug})
|
kwargs={'source_slug': self.slug})
|
||||||
# if self.provider_type == 'github':
|
|
||||||
# return url, 'github-logo', _('GitHub')
|
|
||||||
return url, self.provider_type, self.name
|
return url, self.provider_type, self.name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_info(self):
|
def additional_info(self):
|
||||||
return "Callback URL: '%s'" % reverse_lazy('passbook_oauth_client:oauth-client-callback',
|
return "Callback URL: <pre>%s</pre>" % \
|
||||||
kwargs={'source_slug': self.slug})
|
reverse_lazy('passbook_oauth_client:oauth-client-callback',
|
||||||
|
kwargs={'source_slug': self.slug})
|
||||||
|
|
||||||
def has_user_settings(self):
|
def has_user_settings(self):
|
||||||
"""Entrypoint to integrate with User settings. Can either return False if no
|
"""Entrypoint to integrate with User settings. Can either return False if no
|
||||||
|
|
Reference in New Issue