带django的交互式web应用程序
django_reciprocit的Python项目详细描述
django互易性图片::https://travis-ci.org/mpasternak/django-recipulation.svg?branch=develop
:target:https://travis ci.org/mpasternak/django-recipulation
长话短说,请阅读"django-nginx-push-stream"的说明。这是'BR/>比Django nGixPixFipe高一点——它是一个在JavaScript(基于jQuery和基础6)和Python(Django)上的
交互式Web UI的实现。_ django-nginx-push-stream:http://github.com/mpasternak/django-nginx push-stream
----
~~~~~~~~~~~~~~~~~~~~~~~
使用http推流模块运行nginx。您可以在本地运行它(参见"django nginx push stream"文档),
您可以使用附带的映像运行它。在此回购的根目录中:
…代码块:shell
docker组成web服务器rabbitmq
RT 8080)。默认情况下,它在端口9080上侦听。如果需要更改此端口,请确保调整变量"nginx_push_stream_pub_port"和"test_project.settings"中定义的变量"nginx_push_stream_sub_port"。
compose文件中定义的芹菜容器默认侦听端口45672。如果要更改它,请确保在
``test_project.settings``.
`docker compose.yml``文件中定义了更多的容器。它们用于测试,下载可能需要更多时间,因此最好指定在运行"docker compose"时启动哪些
容器。
根据要求设置测试项目
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
代码块:shell
cd test_project
yarn
pip install-r requirements.txt
export pythonpath=..
python manage.py migrate
celeriy
~~~~
是时候启动我们的后台工作程序了,它将处理长时间运行的任务。
代码块::shell
芹菜工人-测试项目。芹菜-e-l信息
芹菜应该说明我们的运输是"amqp://guest:*@localhost:45672//"。端口
应该与Docker合成容器中使用的端口匹配。
django
~~~~~
能够将请求代理给它:
…代码块:shell
cd test_project
export pythonpath=..
python manage.py runserver 0.0.0:8080
testing
~~~~~~~
转到http://localhost:9080/查看堆栈的运行情况。单击链接
启动"测试应用程序任务"模块中定义的长时间运行的任务。
网页将把它的uuid传递给长时间运行的任务,然后任务将能够通知网页它的进度。
~~~~~~~~~~~~~~~~~~~~
您可以尝试下面"命令行界面"一节中描述的命令。
代码块::shell
python manage.py publish\u message-q\u all\d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
向所有授权(登录)用户发送消息:
。代码块::shell
python manage.py publish\u message-q\u authorized\uu'{"类型":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}'
向特定会话发送消息:
……代码块::shell
python manage.py publish\u message-q\u session\u session-id-d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
代码块::shell
python manage.py publish\u message-q\uuid\u web-page-uuid4-d'{"type":"callout","header":"不错的可选标题","body":"只是一条消息","class":"success"}
命令行界面
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
向所有web发送消息(callout)浏览器:
…代码块::shell
python manage.py publish\u message-q\u all\d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
向所有Web浏览器发送可单击的消息:
。代码块::shell
python manage.py publish\u message-q\u all\uu-d'{"type":"callout with link","ref":"http://www.onet.pl","header":","body":"处理已完成。请单击此链接访问报表。","class":"success"}'
使所有Web浏览器访问不同的网页:
…代码块::shell
python manage.py publish\u message-q\uu all\uu-d'{"type":"转到页面","ref":"http://www.onet.pl"}
显示模式对话框:
……代码块::shell
python manage.py publish\u message-q\uu all\uu'{"type":"model dialog","header":"http://www.onet.pl","lead":"lead","paragraph":"paragraphs"}
关闭先前显示的模式对话框:
。代码块::shell
python manage.py publish\u message-q\u all\uu-d'{"type":"close model dialog"}
显示"请稍候"对话框:
…代码块::shell
python manage.py publish\u message-q\u all\uud'{"type":"请等待对话框","header":"请耐心等待…","lead":"服务器正在工作","paragraph":"操作完成后,页面将刷新。"}'
关闭"请等待"对话框:
代码块::shell
python manage.py publish\u message-q\uu all\uu-d'{"type":"close please wait dialog"}
替换给定jquery选择器的html:
……代码块::shell
python manage.py publish\u message-q\uu all{"type":"html","selector":"body","value":"lol"}
代码块::shell
<0.0.1
----
*第一次公开发布
:target:https://travis ci.org/mpasternak/django-recipulation
长话短说,请阅读"django-nginx-push-stream"的说明。这是'BR/>比Django nGixPixFipe高一点——它是一个在JavaScript(基于jQuery和基础6)和Python(Django)上的
交互式Web UI的实现。_ django-nginx-push-stream:http://github.com/mpasternak/django-nginx push-stream
----
使用http推流模块运行nginx。您可以在本地运行它(参见"django nginx push stream"文档),
您可以使用附带的映像运行它。在此回购的根目录中:
…代码块:shell
docker组成web服务器rabbitmq
RT 8080)。默认情况下,它在端口9080上侦听。如果需要更改此端口,请确保调整变量"nginx_push_stream_pub_port"和"test_project.settings"中定义的变量"nginx_push_stream_sub_port"。
compose文件中定义的芹菜容器默认侦听端口45672。如果要更改它,请确保在
``test_project.settings``.
`docker compose.yml``文件中定义了更多的容器。它们用于测试,下载可能需要更多时间,因此最好指定在运行"docker compose"时启动哪些
容器。
根据要求设置测试项目
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
代码块:shell
cd test_project
yarn
pip install-r requirements.txt
export pythonpath=..
python manage.py migrate
celeriy
~~~~
是时候启动我们的后台工作程序了,它将处理长时间运行的任务。
代码块::shell
芹菜工人-测试项目。芹菜-e-l信息
芹菜应该说明我们的运输是"amqp://guest:*@localhost:45672//"。端口
应该与Docker合成容器中使用的端口匹配。
django
~~~~~
能够将请求代理给它:
…代码块:shell
cd test_project
export pythonpath=..
python manage.py runserver 0.0.0:8080
testing
~~~~~~~
转到http://localhost:9080/查看堆栈的运行情况。单击链接
启动"测试应用程序任务"模块中定义的长时间运行的任务。
网页将把它的uuid传递给长时间运行的任务,然后任务将能够通知网页它的进度。
~~~~~~~~~~~~~~~~~~~~
您可以尝试下面"命令行界面"一节中描述的命令。
代码块::shell
python manage.py publish\u message-q\u all\d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
向所有授权(登录)用户发送消息:
。代码块::shell
python manage.py publish\u message-q\u authorized\uu'{"类型":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}'
向特定会话发送消息:
……代码块::shell
python manage.py publish\u message-q\u session\u session-id-d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
代码块::shell
python manage.py publish\u message-q\uuid\u web-page-uuid4-d'{"type":"callout","header":"不错的可选标题","body":"只是一条消息","class":"success"}
命令行界面
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
向所有web发送消息(callout)浏览器:
…代码块::shell
python manage.py publish\u message-q\u all\d'{"type":"callout","header":"不错的可选标题。","body":"只是一条消息。","class":"success"}
向所有Web浏览器发送可单击的消息:
。代码块::shell
python manage.py publish\u message-q\u all\uu-d'{"type":"callout with link","ref":"http://www.onet.pl","header":","body":"处理已完成。请单击此链接访问报表。","class":"success"}'
使所有Web浏览器访问不同的网页:
…代码块::shell
python manage.py publish\u message-q\uu all\uu-d'{"type":"转到页面","ref":"http://www.onet.pl"}
显示模式对话框:
……代码块::shell
python manage.py publish\u message-q\uu all\uu'{"type":"model dialog","header":"http://www.onet.pl","lead":"lead","paragraph":"paragraphs"}
关闭先前显示的模式对话框:
。代码块::shell
python manage.py publish\u message-q\u all\uu-d'{"type":"close model dialog"}
显示"请稍候"对话框:
…代码块::shell
python manage.py publish\u message-q\u all\uud'{"type":"请等待对话框","header":"请耐心等待…","lead":"服务器正在工作","paragraph":"操作完成后,页面将刷新。"}'
关闭"请等待"对话框:
代码块::shell
python manage.py publish\u message-q\uu all\uu-d'{"type":"close please wait dialog"}
替换给定jquery选择器的html:
……代码块::shell
python manage.py publish\u message-q\uu all{"type":"html","selector":"body","value":"lol"}
代码块::shell
<0.0.1
----
*第一次公开发布