Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions Network Architect Interview Questions

Top 30 TurboGears Framework Interview Questions for 2022

1) What is TurboGears Framework?

TurboGears is a Python Framework. It is used to create rapid web application. It consists of several WSGI (Web Server Gateway Interface) components. It is developed by Kevin Dangoor in 2005.

2) In which language TurboGears was written?

TurboGears was written in Python programming language.

3) What is MVC (Model View Controller) in TurboGears?

MVC model is a software design pattern. It is used to develop web applications. It consists of three parts:
  • Model: It is a business entity which is used to represent the application data.
  • View: It is the presentation layer of MVC.
  • Controller: Request sent by the user always scatters through controller and its responsibility is to redirect to the specific view using View () method.

4) What is the stable version of TurboGears?

The stable version of TurboGears is 2.3.10 and released on 4 December 2016.

5) What are the latest libraries and tools to built TurboGears?

There are various libraries and tools to built TurboGears that are:
  • SQLAlchemy
  • Genshi
  • ToscaWidgets
  • Gearbox

6) What is SQLAlchemy in TurboGears?

In TurboGears, SQLAlchemy is an open source SQL kit that provides Object relation mapping (ORM) for Python code.

7) What are the TurboGears project directories?

TurboGears project directories are listed below table:
Config It is used to project setup and configuration.
Controllers It manages controller the logic of web application.
i018n It supports the languages of translation files.
Lib It provides utility python functions and classes.
Model: It contains database models.
PublicStatic Files It contains CSS, JavaScript and images.
Templates It manages the templates exposed by our controllers.
Tests It is used to test the project.
Websetup It provides the function to execute at application setup.

8) What is the default files installed at the time of project set up?

The following default files are installed at the time of project set up:
  • Beaker
  • Genshi
  • zope.sqlalchemy
  • sqlalchemy
  • alembic
  • repoze.who
  • tw2.forms
  • tgext.admin = 0.6.1
  • WebHelpers2
  • babel

9) What are the default port supported by TurboGears?

TurboGears supported by default port 8080.

10) What are the HTTP methods of TurboGears?

HTTP methods of TurboGears are:
HTTP Methods Descriptions
GET It is used to sends data in unencrypted form to the server.
HEAD It is same as GET
POST It is used to send HTML form data to server.
PUT It replaces all current representations of the target resource with the uploaded content.
DELETE It removes all current representations of the target resource given by a URL

11) What is the use of ToscaWidgets2 and its module?

ToscaWidgets2 is used to define the form field into Python script and render them into a HTML Template. The following modules are:
  • tw2.core: It provides core functionality.
  • tw2.forms: It is a basic forms library that contains widgets for fields, field sets and forms.
  • tw2.dynforms: It contains dynamic forms functionality.
  • tw2.sqla: It is an interface for SQLAlchemy database.

12) What are the various validator classes in TuroGears?

There are various validator classes in TurboGears:
Types of Validators Descriptions
LengthValidator It is used to check prescribe length.
RangeValidator It is used to check the range of the field.
IntValidator It is used to validate the integer types data.
OneOfValidator It is used to select a value from the available options in the list only.
DateValidator It avoids the user to input an invalid date.
EmailValidator It avoids the user to input an invalid email.
UrlValidator It validates the user input for a valid URL.
MatchValidator It is used to confirm whether the value of field is matched with the other.

13) What is ORM in TurboGears?

In TurboGears, ORM stands for Object Relational Mapping. It is a technique of mapping object parameter to underlying RDBMS table structure.

14) What are the CRUD Operations Methods in TurboGears?

In TurboGears, The CRUD operation methods are:
  • DBSession.add(model object): It is used to insert a record into mapped table.
  • DBSession.delete(model object) : It is used to delete the records from the table.
  • DBSession.query(model).all(): It is used to retrieve all the records from table.

15) What are Paginations in TurboGears?

TurboGears provides a convenient decorator called paginate(). It is used to divide the output in the pages. The number of records per pages is decided by value of items_per_page attribute.

16) Which template engine is used to construct the front-end of TG application?

Genshi template engine is used to construct the front-end of TG application.

17) Which method is used to map the root of our first application?

Index() method is used to map the root of our first application.

18) Which package is used to create of web widgets directly from the database schema?

Sprox package is used to create of web widgets directly from the database schema.

19) Which database supports TurboGears?

TurboGear supports MongoDB and SQL dbms database.

20) What are the PyMongo tools to work with MongoDB?

There are various PyMongo tools to work with MongoDB that are listed below: Declarative Models
  • Schema Validation and Conversion
  • Schema Evolution
  • Pure InMemory MongoDB Implementation
  • Unit of Work
  • Identity Map
  • One-To-Many, Many-To-One and Many-To-Many Relations

21) What are the ways to plug behavior inside the existing application in TurboGear?

In TurboGear, there are three ways to plug behavior inside the existing application.
  • Hook
  • Controller Wrapper
  • Application Wrapper

22) Which command is used to create a pluggable application?

The following code is used to create a pluggable application.
gearbox quickstart-pluggable plugtest

23) What is a RestController in TurboGear?

In TurboGear, RestController is a mechanism to access the request's method like GETPOSTPUTand many more.

24) Which method is used to render the page in TurboGear?

In TurboGear, @expose() decorator method is used to render the [age.

25) What is Kajiki in TurboGear?

In TurboGear, Kajiki provides a XML-based template language. It is inspired by Kid and Genshi.

26) How can we create a Text Field object?

We can create a Text Field object by using following constructor.
twf.TextField(size, value = None)

27) What is the default port of TurboGear?

The default port of TurboGear is 8080.

28) What is Scaffolding?

Scaffolding is the process of creating a new component of our web application through a template or preset.

29) How to create an Extension in TurboGear?

The following code is used to create an Extension in TurboGear.
$ gearbox tgext -n myextension -a "My Name" -e "[email protected]"

30) How to store Flash Message?

The following code is used to store Flash Message.
tg.flash('Message', 'status')

31) How to create TurboGear admin?

TurboGear admin is created as object of AdminController class. Example:
from tgext.admin.controller import AdminController  
class RootController(BaseController):  
   admin = AdminController(model, DBSession, config_type = TGAdminConfig)

32) What is Repoze in TurboGear?

In TurboGear, Repoze is used to handle security (identification and authentication). Users can define authorization rules based on predicates attached to controllers