SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
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?

Más contenido relacionado

Destacado

Ç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
 

Destacado (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
 

Similar a Django nedir yenir mi?

Similar a 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
 

Último

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
 

Último (20)

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...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

Django nedir yenir mi?