$30 off During Our Annual Pro Sale. View Details »
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
130
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
73
Streamanje glazbe pomoću Go-a
senko
1
95
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
170
Detecting duplicate SQL queries in Django
senko
1
990
Python 3: Zašto i kako
senko
1
170
Other Decks in Programming
See All in Programming
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
160
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
420
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
170
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
180
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
120
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
110
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
410
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
730
ゲームの物理 剛体編
fadis
0
370
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
110
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
170
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
The Curse of the Amulet
leimatthew05
0
4.7k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Automating Front-end Workflow
addyosmani
1371
200k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
WCS-LA-2024
lcolladotor
0
390
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
75
Done Done
chrislema
186
16k
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