SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
Django:
                         A Whirlwind Tour
                               Brad Montgomery

                           Email: brad@workforpie.com
                             Twitter: bkmontgomery




Friday, November 2, 12
Django: Features
                     • Python
                     • ORM: Object-Relational Mapper
                     • MVC-inspired (MVT)
                     • Clean URLs
                     • Huge Community
                     • Worlds Best Documentation
Friday, November 2, 12
Batteries Included
                              aka: contrib apps
                     • admin
                     • auth
                     • comments
                     • gis
                     • syndication (atom/rss feeds)
                     • sitemaps
Friday, November 2, 12
https://djangoproject.com/




Friday, November 2, 12
Community
                     • 3rd-party, open source apps
                     • django-registration
                     • django-social-auth
                     • django-taggit
                     • django-gravatar2
                     • django-relationships
Friday, November 2, 12
http://djangopackages.com/




Friday, November 2, 12
So, who’s actually using Django?




Friday, November 2, 12
Disqus,
                            Instagram,
                         Pintrest, Mozilla,
                         Rdio, Bitbucket,
                          Work for Pie,
                           GiantBomb,
                            The Onion
Friday, November 2, 12
Projects & Apps
                     • Projects are a collection of applications
                     • Settings
                      • DB Connections
                      • installed apps
                      • Filesystem paths
                     • Command-line tool: manage.py
Friday, November 2, 12
Projects & Apps

                         $ django-admin.py 
                              startproject 
                              sampleproject




Friday, November 2, 12
Projects & Apps
                         sampleproject/
                         !"" manage.py
                         #"" sampleproject
                             !"" __init__.py
                             !"" settings.py
                             !"" urls.py
                             #"" wsgi.py

Friday, November 2, 12
Projects & Apps

                         $ python manage.py 
                                  startapp blog




Friday, November 2, 12
Projects & Apps
                         sampleproject/
                         !"" blog
                             !"" __init__.py
                             !"" models.py
                             !"" tests.py
                             #"" views.py


Friday, November 2, 12
Models
             from django.db import models
             from django.contrib.auth.models import User


             class Post(models.Model):
                 author = models.ForeignKey(User)
                 title = models.CharField(max_length=128)
                 slug = models.SlugField(max_length=128, unique=True)
                 content = models.TextField()
                 published_on = models.DateTimeField(auto_now_add=True)



                         sampleproject/blog/models.py


Friday, November 2, 12
syncdb


                         $ python manage.py syncdb




Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
Views
                     from django.shortcuts import render_to_response
                     from django.template import RequestContext
                     from models import Post

                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
A base template
                             <!DOCTYPE html>
                             <html>
                             <head>
                                 <title>
                                 {% block title %}{% endblock %}
                                 </title>
                             </head>

                             <body>
                                 {% block content %}{% endblock %}
                             </body>
                             </html>


                         sampleproject/sampleproject/templates/base.html




Friday, November 2, 12
A base template
                             <!DOCTYPE html>
                             <html>
                             <head>
                                 <title>
                                 {% block title %}{% endblock %}
                                 </title>
                             </head>

                             <body>
                                 {% block content %}{% endblock %}
                             </body>
                             </html>


                         sampleproject/sampleproject/templates/base.html




Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html


Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html


Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html


Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html


Friday, November 2, 12
A post template
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html


Friday, November 2, 12
URL Conf’s

                     • Tie it all together!
                     • Route HTTP requests to views
                      • May also capture values



Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
Root URLConf
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
An HTTP Request




Friday, November 2, 12
An HTTP Request




Friday, November 2, 12
An HTTP Request
                            blog/sample-title/
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
An HTTP Request
                            blog/sample-title/
                         from django.conf.urls import patterns, include, url

                         from django.contrib import admin
                         admin.autodiscover()

                         urlpatterns = patterns('',
                             url(r'^blog/(?P<post_slug>.+)/$',
                                 'blog.views.display_post',
                                 name='display_post'),
                             url(r'^admin/', include(admin.site.urls)),
                         )



                    sampleproject/sampleproject/urls.py


Friday, November 2, 12
An HTTP Request
                          sample-title
                     def display_post(request, post_slug):
                         post = Post.objects.get(slug=post_slug)
                         template_data = {'post': post}
                         template = "blog/post.html"

                          return render_to_response(
                              template,
                              template_data,
                              context_instance=RequestContext(request)
                          )


                         sampleproject/blog/views.py

Friday, November 2, 12
An HTTP Request
                         {% extends "base.html" %}        Sample Title
                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
An HTTP Request
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}                    Lorem Ipsum...
                         {% block content %}
                             <h1>{{ post.title }}</h1>

                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
An HTTP Request
                         {% extends "base.html" %}

                         {% block title %}
                             {{ post.title }}
                         {% endblock %}

                         {% block content %}
                             <h1>{{ post.title }}</h1>        Nov 3, 2012
                             {{ post.content|urlize|linebreaks }}

                             <p>Published on:
                                {{ post.published_on|date:"M d, Y" }}</p>
                         {% endblock %}


                         sampleproject/blog/templates/blog/post.html



Friday, November 2, 12
An HTTP Request




Friday, November 2, 12
Friday, November 2, 12
A Typical Stack




                                      Linux

Friday, November 2, 12
A Typical Stack




                           PostgreSQL
                                        Linux

Friday, November 2, 12
A Typical Stack


                          Gunicorn + Django



                             PostgreSQL
                                              Linux

Friday, November 2, 12
A Typical Stack
                                nginx


                          Gunicorn + Django



                             PostgreSQL
                                              Linux

Friday, November 2, 12
A Typical Stack
                              Varnish
                                             Memcached
                               nginx

                                             RabbitMQ
                         Gunicorn + Django


                                               Redis
                            PostgreSQL
                                                  Linux

Friday, November 2, 12
Friday, November 2, 12
Enter: Heroku

                     • Deploy & Scale in the Cloud
                     • Provides on-demand App/DB servers
                     • The Heroku Toolbelt
                     • http://www.heroku.com/

Friday, November 2, 12
Deploying to Heroku
                   Do a little bit of setup...
                     $ heroku create

                     Creating app-name... done, stack is cedar
                     http://app-name.herokuapp.com/ | git@heroku.com:app-name.git
                     Git remote heroku added




Friday, November 2, 12
Deploying to Heroku

                     $ git push heroku master

                         ... lots of output ...




Friday, November 2, 12
Deploying to Heroku

                     $ heroku run python manage.py syncdb

                     ... your typical syncdb output ...




Friday, November 2, 12
Deploying to Heroku
                   Develop locally, then when you want
                   to deploy, just run:

                     $ git push heroku master




Friday, November 2, 12
Want to Learn More?

                     •   Official Django Docs

                         •   https://docs.djangoproject.com

                     •   *Djangobook http://www.djangobook.com

                     •   Find Apps: http://www.djangopackages.com/

                     •   Coming Soon: http://gettingstartedwithdjango.com/




Friday, November 2, 12
Q.E.D.




Friday, November 2, 12

Mais conteúdo relacionado

Mais procurados

Hybrid Web Applications
Hybrid Web ApplicationsHybrid Web Applications
Hybrid Web ApplicationsJames Da Costa
 
Django Performance Recipes
Django Performance RecipesDjango Performance Recipes
Django Performance RecipesJon Atkinson
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSHannes Hapke
 
Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django frameworkflapiello
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersRosario Renga
 
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3makoto tsuyuki
 
The effective use of Django ORM
The effective use of Django ORMThe effective use of Django ORM
The effective use of Django ORMYaroslav Muravskyi
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics PresentationShrinath Shenoy
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Djangocolinkingswood
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play NiceAlex Gaynor
 
Moving from Django Apps to Services
Moving from Django Apps to ServicesMoving from Django Apps to Services
Moving from Django Apps to ServicesCraig Kerstiens
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAEWinston Chen
 
Django multi-tier
Django multi-tierDjango multi-tier
Django multi-tiersmirolo
 
Maintainable JavaScript 2012
Maintainable JavaScript 2012Maintainable JavaScript 2012
Maintainable JavaScript 2012Nicholas Zakas
 

Mais procurados (20)

Hybrid Web Applications
Hybrid Web ApplicationsHybrid Web Applications
Hybrid Web Applications
 
Django Performance Recipes
Django Performance RecipesDjango Performance Recipes
Django Performance Recipes
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJS
 
Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django framework
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
 
Django Heresies
Django HeresiesDjango Heresies
Django Heresies
 
Django in the Real World
Django in the Real WorldDjango in the Real World
Django in the Real World
 
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
The effective use of Django ORM
The effective use of Django ORMThe effective use of Django ORM
The effective use of Django ORM
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play Nice
 
Moving from Django Apps to Services
Moving from Django Apps to ServicesMoving from Django Apps to Services
Moving from Django Apps to Services
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAE
 
Django multi-tier
Django multi-tierDjango multi-tier
Django multi-tier
 
Maintainable JavaScript 2012
Maintainable JavaScript 2012Maintainable JavaScript 2012
Maintainable JavaScript 2012
 
Django Documentation
Django DocumentationDjango Documentation
Django Documentation
 

Semelhante a Django a whirlwind tour

Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJoaquim Rocha
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1MicroPyramid .
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfAdrianoSantos888423
 
Gae Meets Django
Gae Meets DjangoGae Meets Django
Gae Meets Djangofool2nd
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talkdtdannen
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheetLam Hoang
 
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1makoto tsuyuki
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoSammy Fung
 
Data Migrations in the App Engine Datastore
Data Migrations in the App Engine DatastoreData Migrations in the App Engine Datastore
Data Migrations in the App Engine DatastoreRyan Morlok
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
django_reference_sheet
django_reference_sheetdjango_reference_sheet
django_reference_sheetwebuploader
 
The Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribThe Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribTzu-ping Chung
 
Dgeni documentation generator
Dgeni   documentation generatorDgeni   documentation generator
Dgeni documentation generatorPeter Darwin
 

Semelhante a Django a whirlwind tour (20)

Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Grails 2.0 Update
Grails 2.0 UpdateGrails 2.0 Update
Grails 2.0 Update
 
Django
DjangoDjango
Django
 
Django - basics
Django - basicsDjango - basics
Django - basics
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1
 
templates in Django material : Training available at Baabtra
templates in Django material : Training available at Baabtratemplates in Django material : Training available at Baabtra
templates in Django material : Training available at Baabtra
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdf
 
Gae Meets Django
Gae Meets DjangoGae Meets Django
Gae Meets Django
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talk
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheet
 
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1
スゴイ django - Python&Djangoで始めるWeb開発 in 札幌 #1
 
Django
DjangoDjango
Django
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and Django
 
Data Migrations in the App Engine Datastore
Data Migrations in the App Engine DatastoreData Migrations in the App Engine Datastore
Data Migrations in the App Engine Datastore
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
django_reference_sheet
django_reference_sheetdjango_reference_sheet
django_reference_sheet
 
The Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribThe Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contrib
 
Dgeni documentation generator
Dgeni   documentation generatorDgeni   documentation generator
Dgeni documentation generator
 

Último

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Último (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Django a whirlwind tour

  • 1. Django: A Whirlwind Tour Brad Montgomery Email: brad@workforpie.com Twitter: bkmontgomery Friday, November 2, 12
  • 2. Django: Features • Python • ORM: Object-Relational Mapper • MVC-inspired (MVT) • Clean URLs • Huge Community • Worlds Best Documentation Friday, November 2, 12
  • 3. Batteries Included aka: contrib apps • admin • auth • comments • gis • syndication (atom/rss feeds) • sitemaps Friday, November 2, 12
  • 5. Community • 3rd-party, open source apps • django-registration • django-social-auth • django-taggit • django-gravatar2 • django-relationships Friday, November 2, 12
  • 7. So, who’s actually using Django? Friday, November 2, 12
  • 8. Disqus, Instagram, Pintrest, Mozilla, Rdio, Bitbucket, Work for Pie, GiantBomb, The Onion Friday, November 2, 12
  • 9. Projects & Apps • Projects are a collection of applications • Settings • DB Connections • installed apps • Filesystem paths • Command-line tool: manage.py Friday, November 2, 12
  • 10. Projects & Apps $ django-admin.py startproject sampleproject Friday, November 2, 12
  • 11. Projects & Apps sampleproject/ !"" manage.py #"" sampleproject !"" __init__.py !"" settings.py !"" urls.py #"" wsgi.py Friday, November 2, 12
  • 12. Projects & Apps $ python manage.py startapp blog Friday, November 2, 12
  • 13. Projects & Apps sampleproject/ !"" blog    !"" __init__.py    !"" models.py    !"" tests.py    #"" views.py Friday, November 2, 12
  • 14. Models from django.db import models from django.contrib.auth.models import User class Post(models.Model): author = models.ForeignKey(User) title = models.CharField(max_length=128) slug = models.SlugField(max_length=128, unique=True) content = models.TextField() published_on = models.DateTimeField(auto_now_add=True) sampleproject/blog/models.py Friday, November 2, 12
  • 15. syncdb $ python manage.py syncdb Friday, November 2, 12
  • 16. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 17. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 18. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 19. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 20. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 21. Views from django.shortcuts import render_to_response from django.template import RequestContext from models import Post def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 22. A base template <!DOCTYPE html> <html> <head> <title> {% block title %}{% endblock %} </title> </head> <body> {% block content %}{% endblock %} </body> </html> sampleproject/sampleproject/templates/base.html Friday, November 2, 12
  • 23. A base template <!DOCTYPE html> <html> <head> <title> {% block title %}{% endblock %} </title> </head> <body> {% block content %}{% endblock %} </body> </html> sampleproject/sampleproject/templates/base.html Friday, November 2, 12
  • 24. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 25. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 26. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 27. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 28. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 29. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 30. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 31. A post template {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 32. URL Conf’s • Tie it all together! • Route HTTP requests to views • May also capture values Friday, November 2, 12
  • 33. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 34. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 35. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 36. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 37. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 38. Root URLConf from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 39. An HTTP Request Friday, November 2, 12
  • 40. An HTTP Request Friday, November 2, 12
  • 41. An HTTP Request blog/sample-title/ from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 42. An HTTP Request blog/sample-title/ from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^blog/(?P<post_slug>.+)/$', 'blog.views.display_post', name='display_post'), url(r'^admin/', include(admin.site.urls)), ) sampleproject/sampleproject/urls.py Friday, November 2, 12
  • 43. An HTTP Request sample-title def display_post(request, post_slug): post = Post.objects.get(slug=post_slug) template_data = {'post': post} template = "blog/post.html" return render_to_response( template, template_data, context_instance=RequestContext(request) ) sampleproject/blog/views.py Friday, November 2, 12
  • 44. An HTTP Request {% extends "base.html" %} Sample Title {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 45. An HTTP Request {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} Lorem Ipsum... {% block content %} <h1>{{ post.title }}</h1> {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 46. An HTTP Request {% extends "base.html" %} {% block title %} {{ post.title }} {% endblock %} {% block content %} <h1>{{ post.title }}</h1> Nov 3, 2012 {{ post.content|urlize|linebreaks }} <p>Published on: {{ post.published_on|date:"M d, Y" }}</p> {% endblock %} sampleproject/blog/templates/blog/post.html Friday, November 2, 12
  • 47. An HTTP Request Friday, November 2, 12
  • 49. A Typical Stack Linux Friday, November 2, 12
  • 50. A Typical Stack PostgreSQL Linux Friday, November 2, 12
  • 51. A Typical Stack Gunicorn + Django PostgreSQL Linux Friday, November 2, 12
  • 52. A Typical Stack nginx Gunicorn + Django PostgreSQL Linux Friday, November 2, 12
  • 53. A Typical Stack Varnish Memcached nginx RabbitMQ Gunicorn + Django Redis PostgreSQL Linux Friday, November 2, 12
  • 55. Enter: Heroku • Deploy & Scale in the Cloud • Provides on-demand App/DB servers • The Heroku Toolbelt • http://www.heroku.com/ Friday, November 2, 12
  • 56. Deploying to Heroku Do a little bit of setup... $ heroku create Creating app-name... done, stack is cedar http://app-name.herokuapp.com/ | git@heroku.com:app-name.git Git remote heroku added Friday, November 2, 12
  • 57. Deploying to Heroku $ git push heroku master ... lots of output ... Friday, November 2, 12
  • 58. Deploying to Heroku $ heroku run python manage.py syncdb ... your typical syncdb output ... Friday, November 2, 12
  • 59. Deploying to Heroku Develop locally, then when you want to deploy, just run: $ git push heroku master Friday, November 2, 12
  • 60. Want to Learn More? • Official Django Docs • https://docs.djangoproject.com • *Djangobook http://www.djangobook.com • Find Apps: http://www.djangopackages.com/ • Coming Soon: http://gettingstartedwithdjango.com/ Friday, November 2, 12