This will allow you to only use your Web server for Django requests and keep your media on a separate server.
这样您的Web服务器就专门用于Django请求,而媒体文件则放在另一个服务器上。
The location of the application inside the project is purely a convention created for new Django developers, not a requirement.
提供应用程序在项目中的位置纯粹是为新Django开发人员建立的一种惯例,并不是必需的。
This is a huge step for the team, to be able to run a widely-used framework, such as Django, on a dynamic language running on the.net framework.
这对于DLR团队而言,是一个巨大的进步,它使得。NET框架的动态语言,能够运行如django这样被广泛使用的框架。
Before discussing how to set up your production environment for your Django application, there are a few things you need to do in your Django application's Settings.
在讨论如何为Django应用程序设置生产环境之前,我们先要对Django应用程序进行一些设置。
Django provides a simple templating language designed for fast rendering and ease of use.
Django提供了一种模板语言,该语言被设计为能够快速呈现且易于使用。
Naturally they chose to use MS SQL Server for their database and Django does not support that database by default.
自然,他们选择使用了MSSQLServer作为他们的数据库,而Django默认是不支持该数据库的。
Django requires, at a minimum, version 2.3.5, which is available at the Python Web site (see the Resources section later in this article for a link).
Django至少需要2.3.5版本的Python,可以从PythonWeb站点上下载它(关于链接请参阅本文后面参考资料部分)。
We will cover deploying Django applications for production use later in this article.
我们将在本文的后面讨论部署用于生产的Django应用程序。
However, the Django configuration system allows for maximum control and flexibility.
然而,Django配置系统可以进行最大限度的控制和灵活性。
As we have seen, the Django framework conveniently includes a development server, which is ideal for debugging and testing your Django application.
我们在前面已经看到,Django框架还包含了一个开发服务器,用它调试和测试django应用程序非常方便。
Django is a mature web application framework written for Python and intended to create applications very fast with a clean and pragmatic design.
Django是用Python编写的一个成熟的Web应用程序框架,用于快速创建具有清晰实用设计的应用程序。
Now that we have configured our Settings for use in a production environment, we will show you how this environment should be set up to house your Django application.
现在已经配置好用于生产环境的设置,接下来我们将演示如何为Django应用程序设置生产环境。
Explore some steps that need to be taken to make your application production-ready, then learn what's involved in preparing your Web server for serving up your Django application.
通过一些步骤使您的应用程序成为生产级应用程序,然后学习如何准备Web服务器,让它能够为Django应用程序提供服务。
That's all there is to setting up Apache and mod_python for deploying Django to a production Web server.
现在已经完全设置好apache和mod_python,您可以将Django应用程序部署到生产Web服务器了。
The render_to_response() method is a Django shortcut for rendering a template with a specific context and returns an HttpResponse object.
render_to_response()方法是一个Django快捷方式,用来呈现一个具有特定上下文的模板,它返回的是一个 HttpResponse 对象。
For that, you need to deploy Django to a production-grade Web server, such as Apache or lighttpd.
因此,您需要将Django应用程序部署到生产级Web服务器,比如apache或lighttpd。
According to the Django documentation, a setup of the Apache Web server running mod_python is the recommended option for deploying Django applications.
根据Django文档,建议对运行mod_python的ApacheWeb服务器进行设置,然后再部署Django应用程序。
Then create a small Python script that informs Apache of the various Settings for your Django project and executes the FastCGI program.
然后创建一小段python脚本,告诉Apache您的Django项目的不同设置,并执行FastCGI程序。
Use the command django-admin startproject pytweetproj where pytweetproj is the name used for the project throughout this article.
使用命令django - admin startprojectpytweetproj,其中py tweetproj是本文中为此项目使用的名称。
For the demo, Dino showed us the latest Django release (v0.96) running on IronPython 2.0 Beta 1 (which was just released on Friday).
对于这个演示,Dino向我们展示了运行在IronPython 2.0Beta1(它刚刚于星期五发布)之上的Django的最新版本(v0.96)。
For the demo, Dino showed us the latest Django release (v0.96) running on IronPython 2.0 Beta 1 (which was just released on Friday).
对于这个演示,Dino向我们展示了运行在IronPython 2.0Beta1(它刚刚于星期五发布)之上的Django的最新版本(v0.96)。
应用推荐