在网络服务器上运行应用程序所需的一切的列表
我想知道的实际上是两件事。
第 1 部分:
我有一个使用 Django 框架的 python 应用程序的开发源代码。 我想要的是能够在开发人员机器上运行代码并查看结果。我需要什么? (我的猜测): Python开发环境(Eclipse/PyDev/Aptana Studio 3似乎对于windows更好,不确定linux),
我还已经设置了一个 postgre 数据库(我知道有一个文件我必须在其中指定连接信息)
- 从 django 安装的东西或者它是否已经包含在我的代码中?
第二部分:
我还想建立一个可通过互联网访问的开发服务器。
- 这是问题的主要部分,也是最重要的部分。如何发布应用程序?
- 我有一台 Linux 机器,我可以在上面执行此操作,但不确定我需要的所有东西。阿帕奇服务器?
What I want to know are actually 2 things.
Part 1:
I have a developed source code for an application in python that uses Django framework.
What I want is to be able to run the code on a developer machine and see the result. What do I need for it?
(my guesses):
Python development enironment (Eclipse/PyDev/Aptana Studio 3 seem to be the better ones for windows not sure linux yet),
I also have a postgre database already setup (I know there's a file where I have to specify connection information)
- something installed from django or would this be already included in the code that I have?
Part II:
I also want to make a dev server accessible through internet.
- this is the major part of the question and the most important. How do I publish the app?
- I have a linux machine that I would do this on, but unsure of all the things I need. Apache server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
回答您的问题:
您需要什么:这里提供了 Django 入门的要求和说明列表:http://djangobook.com/en/2.0/chapter02/。
数据库:该章还包括关于配置访问的部分到您的数据库,其中包含关于 postgreSQL 的特定部分。
开发服务器:要启动基本开发服务器,请参阅此教程部分
部署 django(生产):有关说明如何部署 Django 进行生产,请参阅部署 Django 章节。
在互联网上发布:至于如何通过互联网访问您的开发服务器,请在 https://serverfault.com/ 上询问。确保提供有关网络设置、尝试过的操作、不起作用的操作等的更多信息。(简单来说,您需要确保运行服务器的主机位于可公开访问的 IP 上,或者端口 80 从这样的主机转发到它 如果有疑问,请与您的系统/网络管理员联系(如果您有)或者使用 django 托管服务,例如 http://djangohosting.com)
IDE :关于IDE,看个人喜好了。你说的都可以,Linux下也可以运行。
作为第一步,我建议您按照教程进行操作,该教程将指导您完成整个过程启动开发服务器并开发基本应用程序的过程。
即使您的目标是部署现有应用程序,本教程也会让您了解不同组件(应用程序、模型、url、模板等)如何协同工作,这将有助于在部署出现问题时进行调试。
祝你好运。
To answer your questions:
What you need: A list of requirements and instructions to get started with Django is available here: http://djangobook.com/en/2.0/chapter02/.
Database: that chapter also includes a section on configuring access to your database, with a specific section on postgreSQL.
Dev server: To start a basic development server, see this tutorial section
Deploying django (production): For instructions on how to deploy Django for production, see chapter on deploying Django.
Publishing on internet: as for making your dev server accessible through the internet, ask on https://serverfault.com/. Make sure you provide more information about your network setup, what you've tried, what isn't working, etc. (Briefly, you need to make sure that the host you are running your server on is on a publicly accessible IP, or has port 80 forwarded to it from such a host. If in doubt, speak to your sys/network admin if you have one. Or use a django hosting service such as those listed on http://djangohosting.com)
IDE : Regarding IDE, it's down to personal preference. What you mentioned are fine and can run on Linux too.
As a first step, I suggest you follow the tutorial which guides you through the process of starting a development server and developing a basic app.
Even if your goal is to deploy an existing app, the tutorial will give you an idea of how the different components work together (apps, models, urls, templates, etc) which will help with debugging when something goes wrong with your deployment.
Good luck.
您需要Python、Django、WSGI 容器(例如mod_wsgi、uWSGI、Paste Deploy)和数据库服务器。您可以将 Django 项目作为 WSGI 应用程序使用,并绑定到计算机上的相应接口。
You need Python, Django, a WSGI container (e.g. mod_wsgi, uWSGI, Paste Deploy), and a database server. You make the Django project available as a WSGI app, bound to the appropriate interface on the machine.