nedir, yenir mi?      Cihan Okyaycihan.okyay@linux.org.tr        @cihann
* Open source* Nesne Yönelimli* Temiz sözdizimi* Öğrenmesi kolay* Güçlü
Guido van Rossum
a = 10if a > 5:    print büyükelse:    print küçükdef factorial(x):  if x == 0:      return 1  else:      return x * facto...
Django  The Web framework  for perfectionists with deadlines ...
... not a framework forbeginners with deadlines
Tarihi2003: Kansas, USA2005: BSD & 0.902008: 1.02011: 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)
Modelfrom django.db import models classclass Poll(models.Model):   question = models.CharField(max_length=200)   pub_date ...
ORM>>> from polls.models import Poll, Choice>>> Poll.objects.all()[]>>> import datetime>>> p = Poll(question="Naber?",... ...
orm devam>>> Poll.objects.get(id=1)<Poll: Naber?>>>> Poll.objects.filter(question="Naber?")[<Poll: Naber?>]>>> Poll.object...
>>> p = Poll.objects.get(question="Naber?")>>> p.question = "Naber Django?">>> p.save()>>> p.question
Admin Panel
Viewsfrom django.http import HttpResponsedef hello(request):  return HttpResponse("Hello World!")from django.shortcuts imp...
URLconfsfrom django.conf.urls.defaults import *urlpatterns = patterns(",   (r^polls/$, polls.views.index),)example.com/pol...
Templates
Örnek uygulamahttps://github.com/cihann/djangoistanbulgit@github.com:cihann/djangoistanbul.git
TEŞEKKÜRLER SORULAR?
Django nedir yenir mi?
Upcoming SlideShare
Loading in...5
×

Django nedir yenir mi?

1,556

Published on

özgür web teknolojileri 2011'de yapılan Django nedir, yenir mi? sunumu

Published in: Technology, Business
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
1,556
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Django nedir yenir mi?

  1. 1. nedir, yenir mi? Cihan Okyaycihan.okyay@linux.org.tr @cihann
  2. 2. * Open source* Nesne Yönelimli* Temiz sözdizimi* Öğrenmesi kolay* Güçlü
  3. 3. Guido van Rossum
  4. 4. a = 10if a > 5: print büyükelse: print küçükdef factorial(x): if x == 0: return 1 else: return x * factorial(x - 1)factorial(5)
  5. 5. Django The Web framework for perfectionists with deadlines ...
  6. 6. ... not a framework forbeginners with deadlines
  7. 7. Tarihi2003: Kansas, USA2005: BSD & 0.902008: 1.02011: 1.3
  8. 8. Özellikler * Dökümantasyon * ORM * URL dispatcher * Templates * Interactive terminal * Admin Panel
  9. 9. * Authentication & Authorization* i18n i L10n* Cache* Forms
  10. 10. Mimari MTV (Model, Template, View)
  11. 11. Modelfrom django.db import models classclass 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()
  12. 12. ORM>>> from polls.models import Poll, Choice>>> Poll.objects.all()[]>>> import datetime>>> p = Poll(question="Naber?",... pub_date=datetime.datetime.now())>>> p.save()>>> p.id1>>> p.question"Naber?"
  13. 13. 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?>]
  14. 14. >>> p = Poll.objects.get(question="Naber?")>>> p.question = "Naber Django?">>> p.save()>>> p.question
  15. 15. Admin Panel
  16. 16. Viewsfrom django.http import HttpResponsedef hello(request): return HttpResponse("Hello World!")from django.shortcuts import render_to_responsefrom 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})
  17. 17. URLconfsfrom django.conf.urls.defaults import *urlpatterns = patterns(", (r^polls/$, polls.views.index),)example.com/polls/
  18. 18. Templates
  19. 19. Örnek uygulamahttps://github.com/cihann/djangoistanbulgit@github.com:cihann/djangoistanbul.git
  20. 20. TEŞEKKÜRLER SORULAR?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×