Skip to content

Wrapper to integrate CGI executables in the views of django applications

Notifications You must be signed in to change notification settings

eclipseconsulting/django_cgi_wrap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrapper to integrate CGI scripts into django views.

https://travis-ci.org/nmandery/django_cgi_wrap.svg?branch=master

Simple function to wrap old-style CGI scripts/binaries to integrate them into the views of a django app.

This method preserves the shortcommings of the CGI deployment, but may be adequate when the performance hit caused by CGI spawning a new process for each request is negligible, a legacy CGI executable needs to be embedded in a new application or the ease of deployment is a priority.

Data returned by the CGI will be streamed to the client.

Example:

from django_cgi_wrap import cgi_wrap

def example_view(request):
    return cgi_wrap(request, "/usr/bin/mapserv")

Also see the "tests" directory for a working example as well as the doc-strings of the module itself.

About

Wrapper to integrate CGI executables in the views of django applications

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%