On Dec 13, 12:05 pm, Jim <[email protected]> wrote:
> Hi,
>
> I'm experimenting with building a web server with embedded python and
> I'd like to setup and include Django.   The server works by loading a
> main python script into memory at startup and then script registers a
> callback routine to handle incoming messages.  The script looks
> something like this:
>
> import MyWebServer
>
> # Initialization code
>
> def my_callback(connection_name, request, size):
>         MyWebServer.sendReply(connection_name, 'hello world', 11)
>
> MyWebServer.set_callback(my_callback)
>
> First of all, does this seem like a reasonable approach?  Second, what
> do I need to do to setup the Django environment using this
> architecture?

Make your web server support WSGI API standard and then you can just
use Django WSGI interface. The WSGI specification is documented at:

  http://www.python.org/dev/peps/pep-0333/

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to