Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Look Behind the Curtain
Search
Senko Rašić
November 14, 2017
Programming
0
120
Look Behind the Curtain
A Python Zagreb meetup talk about why we should not be afraid of poking into someone else's code.
Senko Rašić
November 14, 2017
Tweet
Share
More Decks by Senko Rašić
See All by Senko Rašić
Online audio and video using free software and open standards
senko
1
65
Streamanje glazbe pomoću Go-a
senko
1
83
Chasing the Ghost
senko
1
120
Real Time Web with Django Channels
senko
1
180
Building highly available and fault tolerant sites on a budget
senko
1
430
Simple REST with Django
senko
1
95
Building good Web APIs
senko
0
160
Detecting duplicate SQL queries in Django
senko
1
980
Python 3: Zašto i kako
senko
1
160
Other Decks in Programming
See All in Programming
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
220
Claude Codeで挑むOSSコントリビュート
eycjur
0
190
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
140
MLH State of the League: 2026 Season
theycallmeswift
0
210
Portapad紹介プレゼンテーション
gotoumakakeru
1
130
速いWebフレームワークを作る
yusukebe
3
1.2k
Namespace and Its Future
tagomoris
6
680
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
デザインシステムが必須の時代に
yosuke_furukawa
PRO
2
130
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
120
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
130
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
3
340
Featured
See All Featured
Fireside Chat
paigeccino
39
3.6k
Site-Speed That Sticks
csswizardry
10
800
Statistics for Hackers
jakevdp
799
220k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
RailsConf 2023
tenderlove
30
1.2k
How to train your dragon (web standard)
notwaldorf
96
6.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Navigating Team Friction
lara
189
15k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
Into the Great Unknown - MozCon
thekraken
40
2k
Balancing Empowerment & Direction
lara
3
600
Transcript
Look behind the curtain Senko Rašić
None
None
None
“When the getDVRConversions is set to True it expires conversions
automatically.” —paid support Proprietary software
Open Source
None
None
None
None
None
None
None
Sign in with Google * *authorized users only
from allauth.socialaccount.adapter import \ DefaultSocialAccountAdapter class MyAdapter(DefaultSocialAccountAdapter): def is_open_for_signup(self, request):
return False
from allauth.socialaccount.adapter import \ DefaultSocialAccountAdapter class MyAdapter(DefaultSocialAccountAdapter): def is_open_for_signup(self, req,
sociallogin): return False
from allauth.socialaccount.adapter import \ DefaultSocialAccountAdapter class MyAdapter(DefaultSocialAccountAdapter): def is_open_for_signup(self, req,
sociallogin): return False
Django Developer Tragedies AllAuth won’t log in without SocialAccount, but
won’t create SocialAccount without signup.
We need to go deeper
allauth.socialaccount.views.SignupView
a.sa.providers.google.views.oauth2_login a.sa.providers.oauth2.views.OAuth2LoginView ↓ ↓ a.sa.providers.google.views.oauth2_callback a.sa.providers.oauth2.views.OAuth2CallbackView ↓ allauth.socialaccount.views.SignupView
class OAuth2CallbackView(OAuth2View): def dispatch(self, request): … login = self.adapter.complete_login(…) …
return complete_social_login(request, login) ↓ # allauth.socialaccount.helpers def _complete_social_login(req, sociallogin): … if sociallogin.is_existing: … else: ret = _process_signup(req, sociallogin) ↓ # allauth.socialaccount.models class SocialLogin(object): @property def is_existing(self): return self.account.pk
None
# a.sa.provider.google.views class GoogleOAuth2Adapter(OAuth2Adapter): def complete_login(…): … login = self.get_provider().
\ sociallogin_from_response(…) ↓ # a.sa.providers.base class Provider(object): def sociallogin_from_response(…): … sociallogin.user = adapter.new_user(req, sociallogin) … ↓
None
# allauth.socialaccount.models class SocialLogin(object): @property def is_existing(self): return self.account.pk
None
None
# allauth.socialaccount.helpers def complete_social_login(request, sociallogin): assert not sociallogin.is_existing …
None
None
千⾥里里之⾏行行,始於⾜足下 Debugging of thousand lines starts with a single step
Thank you! @senkorasic