Metadata-Version: 2.1
Name: django-cgi
Version: 0.1.0
Summary: Run Django with CGI
Home-page: https://github.com/enricobarzetti/django-cgi
Author: Enrico Barzetti
Author-email: enricobarzetti@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: django (>=3.1,<4.0)
Description-Content-Type: text/x-rst

django-cgi
==========

Run Django with CGI

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install django-cgi

Install the app

.. code-block:: python

    INSTALLED_APPS = (
        ...,
        'django_cgi',
    )

Usage
-----

generate_cgi_handler command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

    python manage.py generate_cgi_handler

This will create a file called cgi_handler.py next to manage.py.

Server config
-------------

Point your server to serve the cgi_handler.py file.  This is an example config for Apache:

.. code-block::

    LoadModule cgid_module lib/httpd/modules/mod_cgid.so
    ScriptAlias /path "/repo/cgi_handler.py"
    <Directory "/repo">
        AllowOverride None
        Options None
        Require all granted
    </Directory>

