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
AngularJS and Django - Meetup Django CH #19
Search
Gregory Favre
January 23, 2014
Programming
2
190
AngularJS and Django - Meetup Django CH #19
What is AngularJS, how is it different from django and how can they combine.
Gregory Favre
January 23, 2014
Tweet
Share
More Decks by Gregory Favre
See All by Gregory Favre
Déploiement d'un projet Django
gfavre
0
37
Other Decks in Programming
See All in Programming
Patterns of Patterns
denyspoltorak
0
1.4k
組織で育むオブザーバビリティ
ryota_hnk
0
180
Fluid Templating in TYPO3 14
s2b
0
130
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
CSC307 Lecture 01
javiergs
PRO
0
690
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
310
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
140
CSC307 Lecture 10
javiergs
PRO
1
660
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
200
Data-Centric Kaggle
isax1015
2
780
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
Become a Pro
speakerdeck
PRO
31
5.8k
We Have a Design System, Now What?
morganepeng
54
8k
Designing Experiences People Love
moore
144
24k
Producing Creativity
orderedlist
PRO
348
40k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
The Limits of Empathy - UXLibs8
cassininazir
1
220
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
Abbi's Birthday
coloredviolet
1
4.8k
Between Models and Reality
mayunak
1
190
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
100
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
Transcript
https:// www.djangoproject.com/s/img/ logos/django-logo-positive.png A marriage of convenience? —
AngularJS • Full featured Single Page Application framework • Well
documented and widely used Forks (GitHub) 0 1500 3000 4500 6000 Angular.js ackbone Em ber.js Knockout Questions (Stack overflow) 0 6000 12000 18000 24000 Angular.js ackbone Em ber.js Knockout
Key features • MVVM framework 㱺 2-way data binding •
Templating • Dependency injection
Demo Business card template https://gist.github.com/gfavre/8594894
MVVM $scope View Controller Django: template Django: view Django: context
+ forms Routes Django: urls.py Django: app Module
Integration with Django • AngularJS does not provide a ORM
• AngularJS and Django will clash: • templates: {{ }} • urls.py vs routes • Different philosophies / coding practices
Solution Angular django-rest-framework or tastypie Django DB JSON
Tips ! • Template symbol clash app.config(function($interpolateProvider{ $interpolateProvider.startSymbol(‘{%’); $interpolateProvider.endSymbol(‘%}’); }]);"
• Minify problem .controller('ctrl1', ["$scope", function($scope){…}
Not solved yet • i18n (same .po?) • urls are
hardcoded in my js
Demo More complex UI https://github.com/gfavre/sportfac