Mercurial > hg > genshi_view
comparison README.txt @ 20:cf19d2e129de
adding a basic README telling how to use
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 05 May 2010 11:59:39 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
19:4a5b542a638c | 20:cf19d2e129de |
---|---|
1 Setting Up A New Project | |
2 ======================== | |
3 | |
4 from start to editing code | |
5 | |
6 0. Install virtualenv [Optional but highly recommended]:: | |
7 | |
8 easy_install virtualenv | |
9 | |
10 1. Make a virtualenv:: | |
11 | |
12 virtualenv myproject | |
13 | |
14 2. Install genshi_view:: | |
15 | |
16 cd myproject | |
17 . bin/activate | |
18 mkdir src | |
19 cd src | |
20 hg clone http://k0s.org/hg/genshi_view # or `easy_install genshi_view` | |
21 cd genshi_view | |
22 python setup.py develop | |
23 cd .. | |
24 | |
25 3. Instantitate a template. genshi_view is a pastescript template | |
26 that will get you a hello world application OOTB:: | |
27 | |
28 paster create -t genshi_view your_project_name | |
29 | |
30 Answer the questions it asks you regarding the template variables. | |
31 | |
32 4. Serve your application to see that it works:: | |
33 | |
34 cd your_project_name | |
35 paster serve your_project_name.ini | |
36 | |
37 Navigate to the URL that paster displays | |
38 | |
39 5. You're done! Helloworld works. Now you just have to edit the | |
40 source code: | |
41 | |
42 - templates are in your_project_name/templates; there is one by default | |
43 - static resources are in your_project_name/static | |
44 - the request dispatcher is at your_project_name/dispatcher | |
45 - the request handlers are at your_project_name/handlers; if you add | |
46 more, don't forget to add them to dipatcher.py's imports and to | |
47 self.handlers in Dispatcher's __init__ function | |
48 |