SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
nedir, yenir mi?


      Cihan Okyay
cihan.okyay@linux.org.tr
        @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
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

git@github.com:cihann/djangoistanbul.git
TEŞEKKÜRLER


 SORULAR?

Weitere ähnliche Inhalte

Andere mochten auch

Çiğdem’s Keynote
Çiğdem’s KeynoteÇiğdem’s Keynote
Çiğdem’s Keynote
Cigdem Duman
 
BAŞARILI GİRİŞİMCİLİK İÇİN
BAŞARILI GİRİŞİMCİLİK İÇİNBAŞARILI GİRİŞİMCİLİK İÇİN
BAŞARILI GİRİŞİMCİLİK İÇİN
Ersan GÜLBAHAR
 

Andere mochten auch (20)

Node.js'e Hızlı Bir Bakış
Node.js'e Hızlı Bir BakışNode.js'e Hızlı Bir Bakış
Node.js'e Hızlı Bir Bakış
 
React
React React
React
 
Chat BOT'lar ve Akıllı Mesajlaşma
Chat BOT'lar ve Akıllı MesajlaşmaChat BOT'lar ve Akıllı Mesajlaşma
Chat BOT'lar ve Akıllı Mesajlaşma
 
RSpec & Rails, an introduction
RSpec & Rails, an introductionRSpec & Rails, an introduction
RSpec & Rails, an introduction
 
Mean Stack
Mean StackMean Stack
Mean Stack
 
hızlıyol İnşaat Teknolojileri - BIM - Proje Yönetimi - Danışmanlık
hızlıyol İnşaat Teknolojileri - BIM - Proje Yönetimi - Danışmanlıkhızlıyol İnşaat Teknolojileri - BIM - Proje Yönetimi - Danışmanlık
hızlıyol İnşaat Teknolojileri - BIM - Proje Yönetimi - Danışmanlık
 
Dijital İletişim
Dijital İletişimDijital İletişim
Dijital İletişim
 
Fiziksel Web ile Kurumsal Teknoloji Çözümleri
Fiziksel Web ile Kurumsal Teknoloji ÇözümleriFiziksel Web ile Kurumsal Teknoloji Çözümleri
Fiziksel Web ile Kurumsal Teknoloji Çözümleri
 
Handbol damas 7º y 8º
Handbol damas 7º y 8º Handbol damas 7º y 8º
Handbol damas 7º y 8º
 
Beacon ile Endüstriyel Çözümler
Beacon ile Endüstriyel ÇözümlerBeacon ile Endüstriyel Çözümler
Beacon ile Endüstriyel Çözümler
 
Türkiyede girişimcilik
Türkiyede girişimcilikTürkiyede girişimcilik
Türkiyede girişimcilik
 
Scrum ve Redmine ile yazılım projesi yönetimi
Scrum ve Redmine ile yazılım projesi yönetimiScrum ve Redmine ile yazılım projesi yönetimi
Scrum ve Redmine ile yazılım projesi yönetimi
 
Çiğdem’s Keynote
Çiğdem’s KeynoteÇiğdem’s Keynote
Çiğdem’s Keynote
 
Kurumlar icin openstack rehberi
Kurumlar icin openstack rehberi Kurumlar icin openstack rehberi
Kurumlar icin openstack rehberi
 
Bilgi teknolojileri alanında girisimcilik
Bilgi teknolojileri alanında girisimcilik Bilgi teknolojileri alanında girisimcilik
Bilgi teknolojileri alanında girisimcilik
 
özetliyorum.com girişim proje
özetliyorum.com girişim projeözetliyorum.com girişim proje
özetliyorum.com girişim proje
 
Uygulama diline karar vermek: HTML5 mi, Native mi yoksa Hibrit uygulama mı?
Uygulama diline karar vermek: HTML5 mi, Native mi yoksa Hibrit uygulama mı?Uygulama diline karar vermek: HTML5 mi, Native mi yoksa Hibrit uygulama mı?
Uygulama diline karar vermek: HTML5 mi, Native mi yoksa Hibrit uygulama mı?
 
Girisimcilik-Yalin-adiloran
Girisimcilik-Yalin-adiloranGirisimcilik-Yalin-adiloran
Girisimcilik-Yalin-adiloran
 
Git 101
Git 101Git 101
Git 101
 
BAŞARILI GİRİŞİMCİLİK İÇİN
BAŞARILI GİRİŞİMCİLİK İÇİNBAŞARILI GİRİŞİMCİLİK İÇİN
BAŞARILI GİRİŞİMCİLİK İÇİN
 

Ähnlich wie Django nedir yenir mi?

Ähnlich wie Django nedir yenir mi? (20)

Symfony presentation
Symfony presentationSymfony presentation
Symfony presentation
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work Everywhere
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShell
 
Python Development (MongoSF)
Python Development (MongoSF)Python Development (MongoSF)
Python Development (MongoSF)
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and Salesforce
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202The Ring programming language version 1.8 book - Part 95 of 202
The Ring programming language version 1.8 book - Part 95 of 202
 
The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196
 
Codemash - Building Custom node.js Modules
Codemash - Building Custom node.js ModulesCodemash - Building Custom node.js Modules
Codemash - Building Custom node.js Modules
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
 
The Ring programming language version 1.5.4 book - Part 180 of 185
The Ring programming language version 1.5.4 book - Part 180 of 185The Ring programming language version 1.5.4 book - Part 180 of 185
The Ring programming language version 1.5.4 book - Part 180 of 185
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
 
Python introduction
Python introductionPython introduction
Python introduction
 
The Ring programming language version 1.5.2 book - Part 176 of 181
The Ring programming language version 1.5.2 book - Part 176 of 181The Ring programming language version 1.5.2 book - Part 176 of 181
The Ring programming language version 1.5.2 book - Part 176 of 181
 
The way from DB-driven development to DDD
The way from DB-driven development to DDDThe way from DB-driven development to DDD
The way from DB-driven development to DDD
 
Inside PyMongo - MongoNYC
Inside PyMongo - MongoNYCInside PyMongo - MongoNYC
Inside PyMongo - MongoNYC
 
The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202
 
Break out of The Box - Part 2
Break out of The Box - Part 2Break out of The Box - Part 2
Break out of The Box - Part 2
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Django nedir yenir mi?