Created
February 14, 2018 21:18
-
-
Save dmytrostriletskyi/55e7f3ce8ffad6ba4d44bb8e2a0bb45a to your computer and use it in GitHub Desktop.
The widget generation using django-telegram-login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django_telegram_login.widgets.constants import ( | |
SMALL, | |
MEDIUM, | |
LARGE, | |
DISABLE_USER_PHOTO, | |
) | |
from django_telegram_login.widgets.generator import ( | |
create_callback_login_widget, | |
create_redirect_login_widget, | |
) | |
bot_name = settings.TELEGRAM_BOT_NAME | |
bot_token = settings.TELEGRAM_BOT_TOKEN | |
redirect_url = settings.TELEGRAM_LOGIN_REDIRECT_URL | |
telegram_login_widget = create_callback_login_widget( | |
bot_name, corner_radius=10, size=MEDIUM | |
) | |
telegram_login_widget = create_redirect_login_widget( | |
redirect_url, bot_name, size=LARGE, user_photo=DISABLE_USER_PHOTO | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment