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
150
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
110
Nasıl Çalışıyorum?
cihann
1
120
Other Decks in Programming
See All in Programming
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
220
NPOでのDevinの活用
codeforeveryone
0
840
Team operations that are not burdened by SRE
kazatohiei
1
310
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
170
生成AI時代のコンポーネントライブラリの作り方
touyou
1
210
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
150
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
140
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
効率的な開発手段として VRTを活用する
ishkawa
0
140
RailsGirls IZUMO スポンサーLT
16bitidol
0
180
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
420
PipeCDのプラグイン化で目指すところ
warashi
1
280
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7k
Facilitating Awesome Meetings
lara
54
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Code Review Best Practice
trishagee
69
18k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
RailsConf 2023
tenderlove
30
1.1k
The Language of Interfaces
destraynor
158
25k
We Have a Design System, Now What?
morganepeng
53
7.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
740
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?