Skip to content

Instantly share code, notes, and snippets.

@dmytrostriletskyi
Last active February 14, 2018 22:48
Show Gist options
  • Save dmytrostriletskyi/9a7dc877c32a3a7b6e20629c554809b9 to your computer and use it in GitHub Desktop.
Save dmytrostriletskyi/9a7dc877c32a3a7b6e20629c554809b9 to your computer and use it in GitHub Desktop.
The widget is going to be rendered from view's context
It is a template to render a callback Telegram widget!
<!-- {{ telegram_login_widget|safe }} -->
{% autoescape off %}{{ telegram_login_widget }}{% endautoescape %}
<script type="text/javascript">
function onTelegramAuth(user) {
alert('Logged in as ' + user.first_name + ' ' + user.last_name + '!');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment