To switch over from a development environment to a full-fledged production environment, application needs to be deployed on a real internet server. Depending upon what you have got, there are distinct options available to install a TurboGears net application.
The mod_wsgi is an Apache module evolved by using Graham Dumpleton. It permits WSGI packages to be served using the Apache internet server.
Firstly, installation Apache 2.X on your platform, if not done already. As soon as you've got Apache established, deploy mod_wsgi. Create and activate Python digital environment at the server and installation TurboGears in it.
Installation your utility in the utility director, then create a script named app.wsgi.
Configure Apache installation as follows –
Circus is a process & socket manager. It can be used to monitor and control processes and sockets. When paired with the Chaussette WSGI server, it can become a powerful tool to deploy your application and manage any related process your applications need.
Install the Google AppEngine SDK for Python from the following URL − https://cloud.google.coms
Install the Google AppEngine on your system. Then open Google Developer console and sign in with your Google Account − https://console.developers.google.com/start
Create a new project called mytgapp –
Using Google AppEngine Launcher, create a new application named mytgapp.
The following files will be created in the specified directory −
By default,the created application relies on the Webapp2 framework. To remove this dependency, edit the app.yaml file and delete the following part −
Create a temporary virtual environment in a directory named mytgapp and install TurboGears. Create a TurboGears application in it. Now we can proceed editing the main.py file which is started by AppEngine to run our application and actually write a TurboGears application there.
Add the following contents in main.py −
Now run the application from AppEngine Launcher and click on browse button to see that application works properly on the localhost.
We have already created a project named mytgapp in the developer console. Now click on the deploy button in the Launcher. After the deployment process is over, http://mytgapp.appspot.com/ visit to view our application online.
TurboGears Related Interview Questions
|Python Interview Questions||MVC Framework Interview Questions|
|Microsoft Entity Framework Interview Questions||HTTP Interview Questions|
|Java collections framework Interview Questions||Microsoft Solutions Framework (MSF) Interview Questions|
|Unittest Framework Interview Questions||wxPython Interview Questions|
|Spring MVC Framework Interview Questions||Python Automation Testing Interview Questions|
|Web API Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.