spyce
         
home     documentation     download     Spyce logo


Documentation - Install

Prev: 3.10.7 - Notes on Apache integration Up: 3.10 - Installation Next: 3.11 - Programmatic Interface

3.10.8. Starting your first project

Spyce provides a simple method to create a new project. This creates directories for your Spyce project, creates an initial Spyce config file, and sets up other resources.

For example, running

python spyceProject.py /var/firstproject
results in the following directory structure
$ tree /var/firstproject/
    /var/firstproject/
    |-- config.py
    |-- lib
    |-- login_tokens
    `-- www
        |-- _util
        |   |-- form_calendar.gif
        |   `-- form_calendar.js
        |-- index.spy
        |-- parent.spi
        `-- style.css
Now you can simply run spyceCmd.py -l --conf /var/firstproject/config.py and browse to http://localhost:8000/index.spy to verify that it worked.

Notes:

  • The login_tokens directory is used by the spy:login tags; do not remove it.
  • The lib/ directory (also initially empty) is placed on the Python sys.path, meaning you can import any Python module in this directory from any .spy file. It is good practice to put re-usable code into .py files in this directory.

Prev: 3.10.7 - Notes on Apache integration Up: 3.10 - Installation Next: 3.11 - Programmatic Interface


Spyce logo
Python Server Pages
version 2.1.3
Spyce Powered SourceForge Logo