Category: Turbo Gears
-
HTTP Methods
Http Protocol is the foundation of data communication in world wide web. Different methods of data retrieval from specified URL are defined in this protocol. Following table summarizes different http methods − Sr.No. HTTP Methods & Description 1 GETSends data in unencrypted form to the server. Most common method. 2 HEADSame as GET, but without…
-
Serving Templates
An Event though HTML content can be returned to the browser, for more advanced output, the use of template engine is always preferred. In a full stack project ‘quickstarted’ by gearbox, Genshi is enabled as the default template renderer. In a minimal application, however Genshi (or any other template engine, such as jinja) needs to…
-
Dependencies
A TurboGears project contains the following directories − How to Install a project This project now needs to be installed. A setup.py is already provided in project’s base directory. Project dependencies get installed when this script is executed.Python setup.py develop By default, following dependencies are installed at the time of project set up − After installation, start…
-
First Program
TurboGears has a minimal mode that makes it possible to create single file applications quickly. Simple examples and services can be built quickly with minimal set of dependencies. Application class in a TG application is inherited from TGController class. Methods in this class are available for access by @expose decorator from tg module. In our first application, index() method is mapped as root…
-
Environment
Prerequisite Python 2.6 or higher. Earlier versions of TurboGears were not compliant with Python 3.X. Latest version claims to work well on Python 3.X. However, official documentation of TurboGears is still based on Python 2.7 environment. The following command installs virtualenv −pip install virtualenv This command needs administrator privileges. Add sudo before pip on Linux/Mac OS. If you are on Windows,…
-
Overview
What is Web Framework? Web Application Framework or simply Web Framework represents a collection of libraries and modules, which enables a web application developer to write applications, without having to bother about low level details such as protocols, thread management, etc. What is TurboGears? TurboGears is a web application framework written in Python. Originally created…