Django 101

43 %
57 %
Information about Django 101

Published on February 1, 2009

Author: rcoup



Introduction to Django, given at an Auckland NZPUG meeting in June 2008.

Django 101 Robert Coup

What is Django? “ The Web framework for perfectionists with deadlines Django makes it easier to build better Web apps more quickly and with less code

Who am I? • Robert Coup • CTO of Koordinates - making geospatial data more accessible - • OSS contributor • 2 year Djangonaut •

What’s it for? • Building dynamic Web sites • A high level Web framework • Abstracts common problems • Shortcuts for fast development

Key Features • nice url handling • object : db mapping • forms • templating • admin interface • caching, syndication, middleware, email, sql, modules, authentication, sessions, comments, sitemaps, gis, …

So? And? • work at a nice abstraction level • just Python, no magic • gets out of your way

Architecture • “MVT” • Models describe your data • Views control what a user sees and does • Templates are what they see

Sample App - Yachties • Yacht racing crews • Schedule of races • Notify and Invite crew to races • Know who’s coming

Install Django • Database: Sqlite, Postgres, MySQL, Oracle • Web: Apache, FastCGI, wsgi, dev-server • Use Trunk, checkout from SVN • • python install

Projects and Apps • django-admin startproject yachties • cd yachties • django-admin startapp racing

Models • • describes the fields • turned into database tables • the logic and rules of the application

Settings • • Just a Python file

Databases • Django will create your tables for you • python syncdb • Additional SQL commands: • python sql* • Ability to preload data

Shell • python shell • from import Race • Manipulate your models live

Server • Server for development & debugging • python runserver • http://localhost:8000/

Automatic Admin Site • Built dynamically from your models • Authentication & validation • Flexible and customisable

URL Handling • All in • Separates views from how they’re called • Just regular expressions

Views • The “controller” • Just Python functions • that take a request • and return a response

Templates • What the user sees • No code

Templates • Pulls data from a dictionary (“context”) • Simple logic constructs (“tags”) • Simple data manipulation (“filters”) • Inheritance

More • Form generation & handling • Contrib apps: • builtin: admin, forms, gis, feeds, • 3 party: see Google Code rd • Any Python code will work with Django

Support • Quality documentation • Django Book • • Mailing lists, IRC

Google App Engine • Google’s “cloud computing” platform • Python based • Runs Django • Modified model layer •

Sites • Lots of news/journalism sites • Washington Post • Pownce • Koordinates •


Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Django 101

Interactive online audio course, learn Python/Django in 22 easy to follow chapters.
Read more

Django 101: The Python Web Framework - Codal

“The Django Book is an excellent online resource for Django beginners that wish to gain an intermediate level of proficiency with the framework.”
Read more

Django Reinhardt 101 - Django Reinhardt | Songs, Reviews ...

Find album reviews, stream songs, credits and award information for Django Reinhardt 101 - Django Reinhardt on AllMusic - 2001
Read more

Django 101 - Visitor gateway to Bellingen, Dorrigo ...

Django 101. Date: Saturday 26th February @ 7:30pm Venue: Bellingen High School MPC. Waterfall Way Centre 6655 1522 . Django turns 101 “Django 101” is ...
Read more

Django Unchained - Wikipedia, the free encyclopedia

Django Unchained is a 2012 American western film written and directed by Quentin Tarantino. Set in the Old West and Antebellum South, it is a highly ...
Read more

django-social-auth 101 - Django Screencasts and Tutorials ...

Django-social-auth is probably the best, at the very least one of the best, Django applications for handling 3rd party authentication systems.
Read more

Django 101 — Django 101 Tutorial - OpenTechSchool ...

Django 101¶ Das Django 101 Tutorial basiert auf und wurde für die OpenTechSchool PyCoaches angepasst.
Read more

The first views — Django 101 Tutorial - OpenTechSchool ...

Django 101 Tutorial ... from django.conf.urls import patterns, include, url from django.views.generic.base import TemplateView # Uncomment the next two ...
Read more

Django 101 | Popcorn.js

Django 101 by Dave de Fijter. An online programming course that uses popcorn.js to synchronize examples to narration. From the website: * A complete 22 ...
Read more

101 Jazz Guitar Essentials

1. Februar 2013 | Format: MP3 . Schreiben Sie die erste Bewertung . EUR 12,49 (Alle Preisangaben inkl. MwSt.) › Weitere Hinweise und Aktionen
Read more