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
Django Nedir, Yenir mi?
Search
Cihan Okyay
April 03, 2013
Programming
0
130
Django Nedir, Yenir mi?
Django'ya Giriş sunumu. Sunum 2011 Özgür Web Günleri sırasında yapıldı.
Cihan Okyay
April 03, 2013
Tweet
Share
More Decks by Cihan Okyay
See All by Cihan Okyay
Docker 101
cihann
3
400
Daha İyi Geliştirme Ortamları İçin Vagrant
cihann
2
120
Özgür Yazılım Geliştirerek Sosyalleşmek
cihann
0
91
Nasıl Çalışıyorum?
cihann
1
100
Other Decks in Programming
See All in Programming
Inner Source@DB: Eine Geschichte über Open-Source-Praktiken im DB Konzern
morl99
1
100
Deep Dive into React Stream/Serialize
mugi_uno
3
780
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.3k
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.4k
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
1k
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
4
580
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
150
Three ways to use AI on Android: The Good, the Bad and the Ugly
marxallski
0
110
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
2
130
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
930
TSKaigi 2024 - 新サービス Progate Path の演習で TypeScript を採用して見えた教材観点からの利点と課題
makotoshimazu
1
150
TypeScriptコードの漸進的改善 / Progressive Improvement of TypeScript Code
medley
1
130
Featured
See All Featured
Happy Clients
brianwarren
92
6.4k
A Tale of Four Properties
chriscoyier
153
22k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.7k
It's Worth the Effort
3n
180
27k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Web development in the modern age
philhawksworth
203
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Building Your Own Lightsaber
phodgson
100
5.7k
Code Reviewing Like a Champion
maltzj
515
39k
Designing for humans not robots
tammielis
247
25k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Done Done
chrislema
178
15k
Transcript
nedir, yenir mi? Cihan Okyay
[email protected]
@cihann
* Open source * Nesne Yönelimli * Temiz sözdizimi *
Öğrenmesi kolay * Güçlü
Guido van Rossum
a = 10 if a > 5: print 'büyük' else:
print 'küçük' def factorial(x): if x == 0: return 1 else: return x * factorial(x - 1) factorial(5)
Django The Web framework for perfectionists with deadlines ...
... not a framework for beginners with deadlines
Tarihi 2003: Kansas, USA 2005: BSD & 0.90 2008: 1.0
2011: 1.3
Özellikler * Dökümantasyon * ORM * URL dispatcher * Templates
* Interactive terminal * Admin Panel
* Authentication & Authorization * i18n i L10n * Cache
* Forms
Mimari MTV (Model, Template, View)
Model from django.db import models class class Poll(models.Model): question =
models.CharField(max_length=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): poll = models.ForeignKey(Poll) choice = models.CharField(max_length=200) votes = models.IntegerField()
ORM >>> from polls.models import Poll, Choice >>> Poll.objects.all() []
>>> import datetime >>> p = Poll(question="Naber?", ... pub_date=datetime.datetime.now()) >>> p.save() >>> p.id 1 >>> p.question "Naber?"
orm devam >>> Poll.objects.get(id=1) <Poll: Naber?> >>> Poll.objects.filter(question="Naber?") [<Poll: Naber?>]
>>> Poll.objects.all().order_by("question") [<Poll: Naber?>] >>> Poll.objects.filter(question__startswith="Nab") [<Poll: Naber?>]
>>> p = Poll.objects.get(question="Naber?") >>> p.question = "Naber Django?" >>>
p.save() >>> p.question
Admin Panel
None
Views from django.http import HttpResponse def hello(request): return HttpResponse("Hello World!")
from django.shortcuts import render_to_response from polls.models import * def index(request): latest_poll_list = Poll.objects.all().order_by('-pub_date') return render_to_response('index.html', {'latest_poll_list': latest_poll_list})
URLconfs from django.conf.urls.defaults import * urlpatterns = patterns(''", (r'^polls/$', 'polls.views.index'),
) example.com/polls/
Templates
Örnek uygulama https://github.com/cihann/djangoistanbul
[email protected]
:cihann/djangoistanbul.git
TEŞEKKÜRLER SORULAR?