Home - NucleaPeon/easy-wsgi GitHub Wiki
Welcome to the easy-wsgi wiki!
For the uninitiated, wsgi is software to allow CGI using Python.
Essentially this means you can run scripts on the server by invoking them via the client (through a web browser or ajax/http request)
In order to run wsgi, you need the following packages:
- apache2
- libapache2-mod-wsgi
apt-get install apache2 libapache2-mod-wsgi
I also prefer to include:
- pylint
- git
Just by installing apache on a Debian-based system, you should be able to go to localhost in your web browser and have the index.html page appear fine.
As we are using wsgi, the first step is to go through and have this page parsed through wsgi instead of the default html renderer.
Instead of using my easy-wsgi
project, let's use regular wsgi so you get a feel for how it functions natively.
First we must configure apache. See the following page for my apache configuration and an explaination of it.
Once you have have an apache configuration set up with the .wsgi file containing the Simple Wsgi content, refresh the page and hopefully you will see the "It Works!" page. If not, look for syntax issues in your apache configuration file and make sure to restart apache2 if you made any changes to the wsgi file since your last apache restart.
easy-wsgi is the plain wsgi parser with an over-glorified regex replacement mechanism to allow for special <?wsgi ?>
tags to enable you to call python scripts directly from html pages, similar to php.
In addition to wsgi tags, easy-wsgi contains Templating for easier-to-read html files and consistent page content without headaches of including tags. It's all automatic.
Go through the easy-wsgi tutorial for creating consistent pages and scripts on our index.html
page:
TODO: Cover permissions, proper dir structure, good practices
- The project is still in beginning incomplete stages of its life.