Pylons

Pylons is an open source web application framework for Python.

Deploying an Existing Pylons Project

To deploy a Pylons project that has been developed outside of the WebFaction environment:

  1. Create a Pylons application.
    1. Log in to the control panel.
    2. Click Domains / websites ‣ Applications. The list of applications appears.
    3. Click the Add new application button. The Create a new application form appears.
    4. In the Name field, enter a name for the application.
    5. In the App Category menu, click to select Pylons.
    6. In the App type menu, click to select the version of Pylons to use.
    7. If applicable, in the Machine menu, select a web server.
    8. Click the Save button. The application is installed and added to the list of applications.
    9. Make a note of the application’s port number. The application’s port number appears next to the application’s type. It is required in a later installation step.
  2. Upload the Pylons project to a subdirectory of the application directory. For example, if the project is named myproject, upload the project to $HOME/webapps/application/myproject.
  3. Update development.ini.
    1. Open an SSH session to your account.
    2. Open $HOME/webapps/application/project/development.ini in a text editor.
    3. In the [server:main] section, replace the line starting with port = with port = number where number is the port number provided for the application in the WebFaction control panel.
    4. Save and close the file.
    5. Switch to the application directory. Enter cd $HOME/webapps/application and press Enter.
    6. Create a symlink to development.ini. Enter ln -fs ./project/development.ini and press Enter.
  4. Restart the Pylons application.

To make the Pylons application available on the Web, add the Pylons application to a website record.

Starting, Stopping, and Restarting Pylons

Pylons applications include a script to start, stop, and restart the application.

Starting

If a Pylons application is not already running, it is automatically started by a cron job every 20 minutes. To manually start the application:

  1. Open an SSH session to your account.
  2. Enter $HOME/webapps/application/bin/start, where application is the name of the application as it appears on the control panel, and press Enter.

Stopping

To stop a Pylons application:

  1. Open an SSH session to your account.
  2. Enter $HOME/webapps/application/bin/stop, where application is the name of the application as it appears on the control panel, and press Enter.

Note

When the Pylons application was installed, a cron job was also created to automatically start the application—if it’s not already running—every 20 minutes. If you wish to prevent the application from being started automatically, this cron job must be removed. Please see Scheduling Tasks with Cron for details on modifying your cron jobs.

Restarting

To restart a Pylons application:

  1. Open an SSH session to your account.
  2. Enter $HOME/webapps/application/bin/restart, where application is the name of the application as it appears on the control panel, and press Enter.

Previous topic

PHP

Next topic

Pyramid

Search the documentation

Example: "configure email" or "create database"

Feedback

Send us your feedback on this documentation.