Вы находитесь на странице: 1из 17

Introduction to

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
What is Django?
Django is a high-level Python Web
framework that encourages rapid
development and clean, pragmatic
design.

Django makes it easier to build


better Web apps more quickly and
with less code.

Jay Graves
The Web framework
Refresh Denverwith
09/17/2008
http://refreshdenver.org/
Django
Components
Think MTV instead of MVC

Models - Django ORM


Templates - Django Template Engine
Views - Python function, Request in
Response out.
URL Patterns - Regular expression
Jay Graves based Refresh Denver
http://refreshdenver.org/
09/17/2008
Lets Build a Project
./djangoadmin.pystartprojectspamstr

spamstr/
__init__.py
manage.py
settings.py
urls.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
Lets Add an App
./manage.pystartappperson

spamstr/
person/
__init__.py
models.py
views.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
models.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
models.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
models.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
Create Your
Database
./manage.pysyncdb

...
Creatingtable
peopleCreatingtable
phones
...

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
urls.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
views.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
views.py

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
index.html

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
./manage.py
runserver

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
Admin

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
Admin

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/
Thank You

Django - http://www.djangoproject.com/

spamstr-django
http://github.com/skabber/spamstr-django/

Refresh Denver
Jay Graves 09/17/2008
http://refreshdenver.org/