Django for Designers: Difference between revisions
imported>Aldeka (Created page with "== Introduction == In this tutorial, we will explain topics and provide commands for you to run on your own computer. You will leave with a working social bookmarking web app...") |
imported>Aldeka |
||
Line 103:
Accessing a Django-powered API (Tastypie)
Learn about regular expressions (those crazy things we used in URLs)
Learn about relational databases
|
Revision as of 22:40, 23 February 2013
Introduction
In this tutorial, we will explain topics and provide commands for you to run on your own computer. You will leave with a working social bookmarking web app!
This is a tutorial on web programming, so we will go beyond just Django and discuss third-party Django apps and other real-world web development tools. We'll also be emphasizing areas of Django that particularly affect designers, such as static files, template inheritance, and AJAX.
Things you should know already
- HTML familiarity
- Basic Python proficiency
- Basic or better Javascript proficiency
- Pre-requisites that we will help with
We expect you to have git, Python, and a few other elements ready on your laptop before the tutorial. We will publish a laptop setup guide that steps you through:
- Installing Python, git, pip, virtualenv, and a reasonable text editor
- Setting up your env with Django, South, and django-debug-toolbar
- Basic command line knowledge (cd, ls, etc)
- Basic git knowledge
- Setting up your git repo for the tutorial
Things you do not need to know already:
- Django :)
- What an ORM is
- Anything database related
Curriculum
Part 1: Starting our project
What we're building today -- a simple social bookmarking application
Activate your env
Start your project
Set up your settings and database
Projects vs. apps distinction
Set up tests, watch them fail
Start your first app
Syncdb
Part 2: URLs, basic views, templates, static files
M-V-C separation concept
Writing our URLs
Handling those URLs with placeholder views
Django templates 101
Static files
Part 3: Models, our database, and making it visible
Introduction to databases and the ORM, or: finally, something we couldn't've done with plain HTML/CSS/JS!
Creating a basic model, in models.py
Creating tables (carefully, with South)
Add data to your app via the command line
Database migrations and South, part 2
Modify views and templates to use model data
Part 4: Reusing others' apps
Users and authentication
CRUD with Django forms
Part 5: AJAX and style time
Adding and updating bookmarks with JSON and asynchronous Javascript
(sync up here)
Time to make our CSS and/or JS more awesome!
Part 6: Sharing with others
Surfing to classmates' "runserver" instances
Deployment on Heroku
Brief discussion of other deployment options
Part 7: Exercises for the reader
Writing your own tests
Write your own styles / JS frontend behavior
Handling user-uploaded media
Accessing a Django-powered API (Tastypie)
Learn about regular expressions (those crazy things we used in URLs)
Learn about relational databases