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
140
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
410
Daha İyi Geliştirme Ortamları İçin Vagrant
cihann
2
120
Özgür Yazılım Geliştirerek Sosyalleşmek
cihann
0
95
Nasıl Çalışıyorum?
cihann
1
110
Other Decks in Programming
See All in Programming
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
130
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
100
命名をリントする
chiroruxx
1
410
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
100
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Jakarta EE meets AI
ivargrimstad
0
250
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
390
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Gamification - CAS2011
davidbonilla
80
5.1k
A Philosophy of Restraint
colly
203
16k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Scaling GitHub
holman
458
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Fireside Chat
paigeccino
34
3.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Faster Mobile Websites
deanohume
305
30k
Bash Introduction
62gerente
608
210k
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?