summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan Petrello <lists@ryanpetrello.com>2010-12-15 11:15:38 -0500
committerRyan Petrello <lists@ryanpetrello.com>2010-12-15 11:15:38 -0500
commite7e2066b502d0cfea316433b3018d6dff2286a50 (patch)
treeb1e2e07b97a3ce0af4a8162d8af464811a09fa01 /docs
parentbbc8099848b54ab6a79c4a8d9b371fc2b4b69f1b (diff)
downloadpecan-e7e2066b502d0cfea316433b3018d6dff2286a50.tar.gz
Establishing a few very simple conventions in pecan project template for models. Updating the quick_start docs with more information on how to handle model binding. At some point, more documentation/recipes to follow.
Diffstat (limited to 'docs')
-rw-r--r--docs/0.0.1/source/quick_start.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/0.0.1/source/quick_start.rst b/docs/0.0.1/source/quick_start.rst
index 73dd1ad..e6d8429 100644
--- a/docs/0.0.1/source/quick_start.rst
+++ b/docs/0.0.1/source/quick_start.rst
@@ -16,7 +16,7 @@ example project::
$ paster create -t pecan-base
-The above commnad will prompt you for a project name. I chose *test_project*,
+The above command will prompt you for a project name. I chose *test_project*,
this is how it looks like when we run the whole command::
$ paster create -t pecan-base
@@ -37,6 +37,9 @@ this is how it looks like when we run the whole command::
Creating ./test_project/test_project/controllers/
Copying __init__.py to ./test_project/test_project/controllers/__init__.py
Copying root.py to ./test_project/test_project/controllers/root.py
+ Recursing into model
+ Creating ./test_project/test_project/model/
+ Copying __init__.py to ./test_project/test_project/model/__init__.py
Recursing into templates
Creating ./test_project/test_project/templates/
Copying index.html to ./test_project/test_project/templates/index.html
@@ -68,12 +71,14 @@ This is how the structure of your new project should look like::
├── controllers
│   ├── __init__.py
│   └── root.py
+ ├── model
+ │   ├── __init__.py
└── templates
├── index.html
├── layout.html
└── success.html
- 6 directories, 10 files
+ 7 directories, 11 files
A few things have been set for you, let's review them one by one:
@@ -89,9 +94,8 @@ most part, it will contain your models, controllers and templates:
* **controllers**: The container directory for your controller files.
* **templates**: All your templates would go in here.
-Note how there is no **model** directory. Since we haven't defined any
-database for the app the template doesn't supply you one. In case you need it
-later you could create a ``models.py`` file or a ``model`` directory.
+To avoid unneeded dependencies and to remain as flexible as possible, Pecan doesn't impose any database or
+ORM out of the box. You may notice that **model/__init__.py** is mostly empty. Its contents generally contain any code necessary define tables, ORM definitions, and parse bindings from ``pecan.conf``.
.. _running_application: