diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -2,28 +2,39 @@ | |||
2 | CodeMash 2012 Django Precompiler | 2 | CodeMash 2012 Django Precompiler |
3 | ================================ | 3 | ================================ |
4 | 4 | ||
5 | |||
6 | Step 1: Creating a virtualized Python environment | ||
7 | ================================================= | ||
8 | |||
5 | $ virtualenv django-precompiler | 9 | $ virtualenv django-precompiler |
6 | $ cd django-precompiler | 10 | $ cd django-precompiler |
7 | $ source bin/activate | 11 | $ source bin/activate |
8 | $ git init src | 12 | $ git init src |
9 | $ cd src | 13 | $ cd src |
10 | 14 | ||
11 | create requirements.txt | 15 | |
16 | Step 2: Starting a new project | ||
17 | ============================== | ||
18 | |||
19 | Student creates requirements.txt | ||
12 | 20 | ||
13 | $ pip install -r requirements.txt | 21 | $ pip install -r requirements.txt |
14 | 22 | ||
15 | $ django-admin.py startproject codemash | 23 | $ django-admin.py startproject codemash . |
16 | $ mv codemash/ codemash-base | ||
17 | $ mv codemash-base/* . | ||
18 | $ rm -rf codemash-base/ | ||
19 | $ chmod +x manage.py | 24 | $ chmod +x manage.py |
20 | $ ./manage.py runserver | 25 | $ ./manage.py runserver |
21 | 26 | ||
22 | yay, django default page! now let's setup a template | 27 | yay, django default page! |
28 | |||
29 | |||
30 | Step 3: Hello Codemash! | ||
31 | ======================= | ||
32 | |||
33 | now let's setup a template | ||
23 | 34 | ||
24 | $ mkdir codemash/templates | 35 | $ mkdir codemash/templates |
25 | 36 | ||
26 | create codemash/templates/index.html | 37 | Student creates codemash/templates/index.html show very, very barebones HTML on the slide |
27 | 38 | ||
28 | edit codemash/settings.py | 39 | edit codemash/settings.py |
29 | - import os | 40 | - import os |
@@ -31,3 +42,7 @@ edit codemash/settings.py | |||
31 | - update TEMPLATE_DIRS | 42 | - update TEMPLATE_DIRS |
32 | 43 | ||
33 | edit codemash/urls.py | 44 | edit codemash/urls.py |
45 | |||
46 | yay, Hello Codemash! | ||
47 | |||
48 | ## tag: 1.hello | ||