• 第四天学英语:django 第二章 get started(3)


    声明:我学英语用的,文章不适合大家看。

    2.2 Quick install guide (安装向导)

    Before you can use Django,you'll need to get it installed. We have a complete intallation guide that covers all the possibilities ; this guide will guide you to a simple ,minimal installaton that'll work while you walk through the introduction

    当年可以使用django后,你需要开始安装它,我们有完整的安装向导覆盖所有的可能,这个手册会指导你操作一个简单的的安装,你跟着介绍做会搭建起来。

    2.2.1 install python(安装python)

    Being a Python Web framework , Django requires Python.It works with any Python version from 2.5 to 2.7 (due to backwards incompatibilities in Python 3.0,Django does not currently work with Python 3.0 ; see the Dajngo FAQ from more information on supported Python versions and the 3.0 transition), these versions of Python include a lightweight database called SQLite so you won't need to set up a database just yet.

    最为python的Web框架,django需要python,它可以运行在2.5-2.7之间的任何版本(由于python3.0的向后兼容问题,django目前不能运行在python3上;看大家django的FAQ中关于python3.0的过渡支持),这些python版本都包含一个轻量级数据库sqlite,所以现在你不需要安装一个数据库。

    Get python at http://www.python.org . If you're running Linux or Mac OS X,you probably already have it installed.

    从http://www.python.org 下载python,如果你用glinux或mac ,你可能已经安装好了。

    ——————————————————————

    Django on Jython
    if you use Jython(a Python implementation for the java platform),you'll need to follow a few additional steps.See Running Django on Jython for details.
    如果你使用Jython(一个运行在java平台的python),你需要额外的几小步,看详细的django运行在Jython。

    ——————————————————————

    You can verify that Python is installed by typing python from your shell; you should see something like:
    在shell中键入python可以证实你的python安装完成。你可能看到:


    2.2.2 Set up a database (建立数据库)

    If you installed Python 2.5 or later, you can skip this step for now.
    If not,of if you'd like to work with a "large" database engine like PostgreSQL , MySQL , or Oracle    consult the database installation information.
    如果你安装2.5或以后的,你可以跳过这一步了
    如果不是,你需要使用中重量级数据库引擎像PostgreSQL , MySQL , or Oracle 查看数据库安装信息。

    2.2.3 Remove any old versions of Django(移除旧版django)
    If you are upgrading your installation of Django from a previous version,you will need to unistall the old Django version before installing the new version
    如果你要升级旧版django,你需要卸载旧版django,然后在安装新版。

    2.2.4 Install Django

    You've got three easy options to install Django:
    你需要三步简单设置就可安装django:

        Install a version of Django provided by your operating system distribution. this is the quickest option for those who have operating systems that distribute Django.
        安装一个操作系统版得django,这是最快速的选项安装到操作系统上。

        Install an official release. This is the best approach for users who want a stable version number and aren't concerned ablout running a slightly older version of Django.
        安装一个官方版本,这对用户想安装稳定的版本是最好的选择,不需要担心django会是旧版本。

        Install the latest development verison. This is best for users who want the latest-and-greatest features and aren't afraid of running brand-new code.
        安装最新的开发版本,对于像使用最新和最好的功能,并且不担心运行全新的代码。

    ——————————————————

    Always refer to the documentation that corresponds to  the version of Django you're using!
    一般的文档的提示都对应你使用的django版本

    If you do either of the first two steps,keep an eye out for parts of the documentation maked new in development version. that phrase flags features that are only available in development versions of Django ,and they likely won't work with an official release.
    如果你做了前两步,留意文档中的开发版本中的new,这个表示表明只有开发版本的django可用,它很可能不能在正式版中运行。

    ———————————————————

    2.2.5 Verifying(验证)
    To verify that Django can be seen by Python ,type python from your shell . Then at the Python prompt ,try to import Django:
    验证django可以看python,在shell中键入python,然后python提示,试着包含Django:



    2.2.6 That's it!
    That's it - you can now move onto the tutorial
    就是这样,你可以去看用户手册了。

     

  • 相关阅读:
    20201303 2019-2020-2 《Python程序设计》实验三报告
    20201303 2020-2021-2 《Python程序设计》实验二报告
    20201303张奕博 实验一 Python程序设计入门
    2020-2021-1博客汇总
    俄罗斯方块and四则运算实践
    python对于数据库的相关实践
    20201303获奖感言与学习体会
    openssl实践
    2021-2022 2113 2114信息安全导论 第五周总结
    第九章第十章
  • 原文地址:https://www.cnblogs.com/wanself/p/2600060.html
Copyright © 2020-2023  润新知