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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Senko Rašić
November 14, 2017
Programming
0
140
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
76
Streamanje glazbe pomoću Go-a
senko
1
99
Chasing the Ghost
senko
1
140
Real Time Web with Django Channels
senko
1
180
Building highly available and fault tolerant sites on a budget
senko
1
450
Simple REST with Django
senko
1
110
Building good Web APIs
senko
0
180
Detecting duplicate SQL queries in Django
senko
1
1k
Python 3: Zašto i kako
senko
1
180
Other Decks in Programming
See All in Programming
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
470
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
310
並行開発のためのコードレビュー
miyukiw
0
260
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
300
Basic Architectures
denyspoltorak
0
680
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
220
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
CSC307 Lecture 08
javiergs
PRO
0
670
今から始めるClaude Code超入門
448jp
8
8.9k
CSC307 Lecture 05
javiergs
PRO
0
500
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Side Projects
sachag
455
43k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Paper Plane
katiecoart
PRO
0
46k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Skip the Path - Find Your Career Trail
mkilby
0
57
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
94
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