Welcome! Log In Create A New Profile

Advanced

Re: Yet another fastcgi-wsgi gateway

Sergey Shepelev
September 16, 2009 10:00PM
2009/9/16 Alexandr Kutuzov <alleteam@gmail.com>:
>
> Дажнгу удалось запустить вот с такой прослойкой между рулем и сиденьем:
>

Поздравляю с работающим велосипедом. :)

> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> import sys, os
>
> sys.path.append('/Library/Python/2.5/site-packages/ipython-0.9.1-py2.5.egg')
> sys.path.append('/Library/Python/2.5/site-packages/pyftpdlib-0.5.1-py2.5.egg')
> sys.path.append('/Library/Python/2.5/site-packages/PyYAML-3.08-py2.5-macosx-10.5-i386.egg')
> sys.path.append('/Library/Python/2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg')
> sys.path.append('/Library/Python/2.5/site-packages/Jinja2-2.1.1-py2.5-macosx-10.5-i386.egg')
> sys.path.append('/Library/Python/2.5/site-packages/flup-1.0.3.dev_20090612-py2.5.egg')
> sys.path.append('/Library/Python/2.5/site-packages/mutagen-1.16-py2.5.egg')
> sys.path.append('/Library/Python/2.5/site-packages/Django-1.1-py2.5.egg')
>

Вы знаете, что всё должно работать с одним
sys.path.append("/Library/Python/2.5/site-packages") да?

> import django.core.handlers.wsgi
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
> _handler = django.core.handlers.wsgi.WSGIHandler()
>
> def wsgi_app_handler(environ, start_response):
>    return list(_handler(environ, start_response))
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>

Стоило посмотреть, как это делают в других WSGI-HTTP серверах. В
каждом есть несколько модулей, типа example, wsgi, django. Из-за
особенностей, к ней другой подход, да.

> забавно что возвращает она httpresponse объект, поэтому приходится приводить
> к list-у

Я не защищаю джангу, но возвращаемое значение хорошо документировано.
И в джанге и в PEP333.
WSGI приложение должно возвращать итераблю (подразумевается
какой-нибудь ленивый генератор ответа, возможна долгая выдача через
chunked encoding). HttpResponse итерируется. В чем проблема? Зачем
список?

> стандартные пути к пакетам fastpy не наследует, поэтому то что требуется
> должно прописываться руками(пока вот так вот)
> ну и пути у вас будут свои
>

И это уже совсем не nginx.
Subject Author Posted

Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 09, 2009 11:36AM

Re: Yet another fastcgi-wsgi gateway

Sergey Shepelev September 13, 2009 07:40AM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 13, 2009 01:18PM

Re: Yet another fastcgi-wsgi gateway

Sergey Shepelev September 13, 2009 05:34PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov October 05, 2009 10:22AM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov October 15, 2009 08:06PM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 13, 2009 05:54PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 13, 2009 10:56PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 15, 2009 12:20PM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 15, 2009 03:30PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 15, 2009 03:54PM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 15, 2009 04:16PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 15, 2009 05:36PM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 15, 2009 06:54PM

Re: Yet another fastcgi-wsgi gateway

Alexey Kovyrin September 15, 2009 07:22PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 15, 2009 07:26PM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 16, 2009 06:52AM

Re: Yet another fastcgi-wsgi gateway

Anton Bessonov September 16, 2009 07:34AM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 16, 2009 08:50AM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 16, 2009 10:14AM

Re: Yet another fastcgi-wsgi gateway

Sergey Shepelev September 16, 2009 10:00PM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 17, 2009 04:58AM

Re: Yet another fastcgi-wsgi gateway

Alexandr Kutuzov September 17, 2009 10:10AM

Re: Yet another fastcgi-wsgi gateway

Dmitry Morozovsky September 16, 2009 03:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 131
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready