Personal tools
You are here: Home resources sw universal web development web2py web2py documentation

web2py documentation

— filed under: ,

documentation on the inner workings of web2py

Web2py Summary


is a web application framework based on the Model, View Controller design (MVC). Wikipedea http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller has a page on MVC that is worthwhile for those who are unfamiliar with MVC.

 

Web Application Frameworks


For a comparison of MVC web application frameworks see http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

 

Features

  • Build in internationalization
  • MVC design
  • Database abstraction
  • Built in web server
  • Runs on most operating systems
  • Runs out of the box
  • Applications are easily exported and imported
  • All applications files are nicely organized on the local (servers) file system
  • Basic security built in
  • GPL with a commercial exception
  • "Automatic" generation of a functional and very well organized (and portable) application scaffolding including the following:
    •  A functional application programming and editing web interface
    • An easily customizable application database
    • Well conceived MVC setup
    • A directory named after the application containing all of the applications files (and sub-directories) including:
      • an ABOUT file
      • a LICENSE file
      • a Complete organized sub-directory structure for the application, data and all related code including the following directories:
        • cache
        • controllers
        • cron
        • databases
        • errors
        • languages
        • models
        • private
        • sessions
        • static
        • tests
        • uploads
        • views

 

 

Default Installation

When running web2py for the first time you will have three application which ship with it by default. If  web2py is located at /home/test/web2py/applications you will find the following subfolders on a default installation under the applications directory:

/home/test/web2py/applications/admin
/home/test/web2py/applications/examples
/home/test/web2py/applications/welcome

If you create a new application called "test" you will end up with the following new subdirectory:

/home/test/web2py/applications/test

In the new test subdirectory you would have the complete schaffolding for your new application including the default file ABOUT and LICENSE as well as  subfolders controller, model and view as well as a number of other well named folders as listed above in the Features section. All of these folders are created by default when a new application is created using the web interface.

Web2py files listed on the design web interface page:

    Most are one of the folliwng five types

        * Models - Descripe our data representation
       
        * Controllers - Describe that applications workflow and logic

        * Views - Describe our data presentation

        * Languages - Describes how to translate the application presentation in other languages


        * Static Files - Images, CSS (36,37,38), JavaScript,39,40

Creating a new application:

Log in as the administrator

This will take you to

http://127.0.0.1:8000/admin/default/site

Create a new site called "test"

On your local filesystem take a look at the directories created:

cache
controllers
cron
databases
errors
languages
models
modules
private
sessions
static
tests
uploads
views

Files in the root "test" directory include:

ABOUT
__init__.py
LICENSE






Document Actions