• [Django] Setting up Django Development Environment in Ubuntu 14.04


    1. Python

     Of course you will need Python. Still Python 2.7 is preferred, however if you would like to create new projects with Python 3, it is also fine to do.

    Newest Python could be downloaded from https://www.python.org/downloads/

    2. pip

    It is a very powerful tool for installing and managing Python packages. We could use pip to install Django also. To install pip in Ubuntu 14.04, (To upgrade pip: pip install -U pip)

     sudo apt-get install python-pip 

    3. Installing Django

    It will be very convenient and easy to install Django with the help of pip. Simply use:

     sudo pip install Django==1.7 

    (You may refer to www.djangoproject.com/download for more details) Here we install newest Django 1.7 for our projects.

    4. IDE

    It is optional to prepare an IDE for web development using Django, you may purely use text editors like Vim and commandline to complete all your development. However I would recommend to use an IDE for the ease of life. There are two recommended IDEs:

    • PyCharm (http://www.jetbrains.com/pycharm/)

    For PyCharm it has a free community version for Python projects development, also you may either pay or contribute for a standard edition which supports integrated Django development.

    • Aptana (http://www.aptana.com)

    Aptana is a free IDE which is an extension of Eclipse with PyDev dedicated for Web development. It is completely free and I am currently use it.

    Installing Aptana

    To install Aptana 3 in Ubuntu, you may directly download it from its official website, and use deb file to install. (Note: it is not recommended to use the newest version, which has some annoying bugs that you need to attend. Refer to this thread.)

    Configuring Aptana

    You may change the perspective to PyDev for Django development. (Note: There is a known bug for PyDev, that you will have to create and keep an empty PyDev project in your workspace to enable yourself creating Django projects with PyDev.)

    Setting up Python Interpreter

    5. Git

    It is important to make your codes and resources version-controlled if you are in a team or building up a complex system.

  • 相关阅读:
    bzoj 3779 重组病毒——LCT维护子树信息
    bzoj 4010 [HNOI2015]菜肴制作——贪心
    bzoj 2535 && bzoj 2109 [Noi2010]Plane 航空管制——贪心
    bzoj 3671 [Noi2014]随机数生成器——贪心(时间复杂度分配)
    bzoj 2395 [Balkan 2011]Timeismoney——最小乘积生成树
    bzoj 3157 && bzoj 3516 国王奇遇记——推式子
    bzoj 1101 [POI2007]Zap——反演
    hdu 4372 Count the Buildings——第一类斯特林数
    bzoj 2406 矩阵——有源汇上下界可行流
    bzoj 2039 [2009国家集训队]employ人员雇佣——二元关系
  • 原文地址:https://www.cnblogs.com/cheese-bacon/p/4054002.html
Copyright © 2020-2023  润新知