【发布时间】:2017-11-30 06:14:08
【问题描述】:
我无法在 ubuntu django 设置上正确显示我的招摇。我正在使用基于函数的 API,就像这里 https://github.com/m-haziq/django-rest-swagger-docs
这是没有正确显示招摇的结果 - ubuntu 16.04(在 AWS 中)
但是在我的开发环境mac pc上
这是我的招摇模式。如您所见,我有一些日志记录:
https://gitlab.com/firdausmah/railerdotcom/blob/master/railercomapp/swagger_schema.py
以下是一些日志记录:
2017-11-30 06:06:57,367 DEBUG xxxx home hello
2017-11-30 06:07:25,131 DEBUG get(self, request)
2017-11-30 06:07:25,132 DEBUG Check and load if the function has __doc__
2017-11-30 06:07:25,132 DEBUG swagger try yaml_doc
2017-11-30 06:07:25,134 DEBUG if yaml_doc
我的 Django/NGINX/Ubuntu 设置基于此:
https://jee-appy.blogspot.my/2017/01/deply-django-with-nginx.html
请随意查看我的代码,
https://gitlab.com/firdausmah/railerdotcom/tree/master
swagger 可能有什么问题?在开发它的工作。我设置开发和生产的方式没有什么不同。在生产中使用 nginx、gunicorn、supervisor。在 PC 上它在 python manage.py runserver 上运行。
【问题讨论】:
标签: django ubuntu django-rest-framework swagger gunicorn