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
170
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
26
Other Decks in Programming
See All in Programming
キッティングツールによる自動化でセットアップ時間を1時間から3分に短縮
mot_techtalk
2
110
技術サポートでよく見かけるパターンと便利な活用方法
tamai_63
0
150
Fat Controller は悪か? ~光のFat Controller・闇のガリController~
stwile
1
190
2024年版 Kotlin サーバーサイドプログラミング実践開発
n_takehata
3
760
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
2
440
Automatisiere deine Prozesse mit GitHub Actions!
ahus1
0
260
Adding Tests to Untestable Legacy Code
afilina
PRO
0
180
ABEMA 画像配信基盤における Cloudflare Workers の活用
peaceiris
7
650
Ruby Function Composition
bkuhlmann
1
390
Ruby の型に関する活動をやっている話 / Activities related to Ruby types
euglena1215
3
130
並行処理を学びGuzzleと仲良くなる
shimabox
2
280
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
770
Featured
See All Featured
Happy Clients
brianwarren
93
6.5k
Debugging Ruby Performance
tmm1
70
11k
What the flash - Photography Introduction
edds
64
11k
Testing 201, or: Great Expectations
jmmastey
32
6.8k
A Philosophy of Restraint
colly
198
16k
Clear Off the Table
cherdarchuk
87
320k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Why Our Code Smells
bkeepers
PRO
331
56k
Embracing the Ebb and Flow
colly
80
4.3k
Designing for humans not robots
tammielis
247
25k
In The Pink: A Labor of Love
frogandcode
138
21k
BBQ
matthewcrist
80
8.9k
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