User:Ndhanir: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 31: Line 31:
The database package lets you access various of different databases. Accessing different databases refers to connecting to multiple databases. However, its not an [https://en.wikipedia.org/wiki/Object-relational_mapping ORM]. This feature is missing in [https://en.wikipedia.org/wiki/Django_(web_framework) Django] (another web framework) from long time. This feature is helpful for the people who are good at SQl and don't like to use SQL as it is similar to sqlite3 package but doesn't use ORM.
The database package lets you access various of different databases. Accessing different databases refers to connecting to multiple databases. However, its not an [https://en.wikipedia.org/wiki/Object-relational_mapping ORM]. This feature is missing in [https://en.wikipedia.org/wiki/Django_(web_framework) Django] (another web framework) from long time. This feature is helpful for the people who are good at SQl and don't like to use SQL as it is similar to sqlite3 package but doesn't use ORM.


* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]
===Forms===
* [[Using git and github for projects]]
 
* [[Using heroku to deploy your projects]]
A forms package is present in web.py which let's us create forms and validators. Ironically, it doesn't have built-in protection against [https://en.wikipedia.org/wiki/Cross-site_request_forgery CSRF]. If you want to create a login form, you could use forms package to create.
* [[How to Begin a Project from the Current Expertiza Repository]]
 
* [[Git]]
Another interesting feature about web.py is its flexibility. It has flexible modules which can be used with another framework.
* [[How to Change a User's Password on a Development Machine]]
* [[Debugging Rails]]


==Hello world example==
==Hello world example==

Revision as of 07:19, 5 February 2016

Web.py Introduction

Web.py is a free and open source web application framework that is as simple as it is powerful. Web.py was originally published while Aaron swartz worked at reddit.com, where the site used it ass it grew to become one of the top 1000 sites according to Alexa and served millions of daily page views. "It's the anti-framework framework. web.py doesn't get in your way." explained founder Steve Huffman.

The web.py slogan is: "Think about the ideal way to write a web app. Write the code to make it happen.". The goal of web.py is to build the ideal way to make web apps. In web.py, Instead of exposing Python objects, it allows you to build HTTP responses. Instead of trying to make the database look like an object, web.py makes the database easier to use. And instead of coming up with yet another way to write HTML, the web.py template system tries to bring Python into HTML.

Some of the sites which uses web.py are

  • Frinki, a new social network in spanish.
  • oyster.com, a website that reviews hotels uses web.py for the entire website.
  • Make History, a project of the 9/11 memorial museum.

Python

Installation

To install web.py,

  • Firstly, download the following tar file:
wget http://webpy.org/static/web.py-0.37.tar.gz
  • Extract the downloaded tar file
tar -zxvf web.py-0.37.tar.gz
  • tar -zxvf web.py-0.37.tar.gz
cd web.py-0.37/
  • Install and make it accessible to all the applications
sudo python setup.py install

Features of web.py

web.py has two interesting features

Databases

The database package lets you access various of different databases. Accessing different databases refers to connecting to multiple databases. However, its not an ORM. This feature is missing in Django (another web framework) from long time. This feature is helpful for the people who are good at SQl and don't like to use SQL as it is similar to sqlite3 package but doesn't use ORM.

Forms

A forms package is present in web.py which let's us create forms and validators. Ironically, it doesn't have built-in protection against CSRF. If you want to create a login form, you could use forms package to create.

Another interesting feature about web.py is its flexibility. It has flexible modules which can be used with another framework.

Hello world example

Conclusion

References