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
130
Özgür Yazılım Geliştirerek Sosyalleşmek
cihann
0
97
Nasıl Çalışıyorum?
cihann
1
110
Other Decks in Programming
See All in Programming
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.5k
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
WebDriver BiDiとは何なのか
yotahada3
1
150
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
120
PHP ステートレス VS ステートフル 状態管理と並行性 / php-stateless-stateful
ytake
0
100
ML.NETで始める機械学習
ymd65536
0
130
Software Architecture
hschwentner
6
2.1k
DROBEの生成AI活用事例 with AWS
ippey
0
130
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
A Tale of Four Properties
chriscoyier
158
23k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Docker and Python
trallard
44
3.3k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Typedesign – Prime Four
hannesfritz
40
2.5k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
It's Worth the Effort
3n
184
28k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
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?