Instructions for deploying a complete environment for collaborative remote development with Django on Windows. For absolute beginners.

    The article does not claim to be universal, but the article is a workable instruction for deploying the environment from scratch to the “write the first line of code” stage. In the comments, tips and recommendations on improving the instructions are accepted.

    1. Install and configure Python.

    To install Python, it’s, of course, necessary for a start
    • download from http://python.org/download/, then follow the instructions of the installer.
    An optional, but recommended step is to set the PATH environment variable, this is necessary so that you do not have to type extra control words on the command line when managing a project.
    • So, the PATH variable can be found (for Win Vista) through Computer >> Properties >> Advanced system parameters >> Environment variables, in the "System variables" window, find the PATH variable and, not replace, but ADD (!) To this variable the value " C: \ Python25; C: \ Python25 \ Scripts; C: \ Python25 \ lib \ site-packages \ django \ bin ",
    where "C: \ Python25" is the root directory of the installed Python.


    2. Install Django.

    Here, again, first you need to
    • Download Django from http://www.djangoproject.com/download/ in one of the ways presented on the page. 
    • If it was decided to download the official version (in the first way), then, after unpacking the archive, go to the root directory of the unpacked Django in the command line, then run the “setup.py install” command (in case the environment variable from the first step was not set then "python setup.py install").
    The necessary tools are deployed, now it's up to the development environment.


    3. Install Eclipse.

    Here, in general, everything is simple, you can download Eclipse from http://www.eclipse.org/downloads, installation will not be very difficult.


    4. Install and configure PyDev.

    Having Eclipse installed on hand, we can install a plug-in for it for development in Python - its name is PyDev.
    • Launch Eclipse and select Help >> Software Updates >> Find and Install ... from the menu ... (Help >> Software Updates >> Find and Install ...).

    • Select: Search for new features to install. 
      Click the [New Remote Site ...] button and enter the following network address: http://pydev.sourceforge.net/updates/.

    • Select the site you just added by checking the box next to it, and click the [Finish] button.

    • Select the PyDev extension in the list of installation kits and click the [Finish] button. Wait for the selected components to download and install into the system.
    Now we need to configure PyDev.
    • Select Window >> Preferences from the menu, then in the tree on the left, specify PyDev >> Interpreter - Python.

    • At the top of the Python interpreters panel, click [New ...], and specify the full path to the installed Python (python.exe or python for Linux).
    • Next, in the System PYTHONPATH panel, click [New folder] and specify the path to the root Django folder.
    Well, do not forget to click “OK”.


    The following are optional items for setting up a version control system and creating a repository in WEB for remote collaborative development.


    5. Creating a repository (on the hosting of google projects).

    To do this, just for everything, you need to fill out a questionnaire at http://code.google.com/hosting/createProject, being logged in with your Gmail account.


    6. Install and configure SubVersion.

    To work with SubVersion, or version control system, there is a SubEclipse plugin for Eclipse. To install it
    • From the Eclipse menu, select Help >> Software Updates >> Find and Install ... (Help >> Software Updates >> Find and Install ...).

    • Select: Search for new features to install.

    • Click the [New Remote Site ...] button and enter the following network address: http://subclipse.tigris.org/update_1.4.x

    Now the system needs to be configured on the repository created in the fifth step. To do this,
    • by choosing SubEclipse (Window >> Open perspective >> Other ... >> SVN Repository Exploring),
    • in the SVN Repositories panel, select New ... >> Repositoty Location ... in the context menu and insert the repository address in the URL field.
    The repository address is visible on the page of your project on the hosting of Google projects, in the Source tab. This is a line of the form "https: // <project name> .googlecode.com / svn / trunk /".
    • Next, the system will ask for a username and password.
    The login here is the name of the Gmail account, and you will need to generate a password by clicking on the link “When prompted, enter your generated googlecode.com password.” It is located on the same page of your project, in the same Source tab.




    That's it.

    The instructions used the material of the article http://twiki.falkolab.ru/bin/view/Python/SettingUpEclipse .

    Also popular now: