My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
Setup_development_environment  
Updated May 2, 2009 by suciunelu
  1. Install the latest version of Python. You can download the latest Python version from here. The installation path that I choose is c:\Python26.
  2. Add path to python in the Environment Variables. Click Start, right click on My Computer, select Properties; go to Advanced tab and click on Environment variables; on the System variables go to Path, click on Edit and append to Variable value that full to Python installation. Be careful to have any spaces in the path and use ; as separator. This will enable the command prompt to look for Python.exe in the installation folder.
  3. Add a new System variable named PYTHONPATH and set as value the full path to Python installation folder.
  4. Download and install the Django framework. To install the Django framework use this command: python.exe setup.py install (You can find the setup.py file after you downloaded and un-archive the Django archive). This will install the Django framework at c:\Python2.6\Lib\Site-Packages\Django
  5. Add the path to Django to Envrironment variables (see step 2)
  6. Download Eclipse from here. I use the Eclipse Classic 3.4.2.
  7. Download and install Pydev from here.
  8. Configure Eclipse to work with Python. Open Eclipse, go to Windows\Preferences; Go to PyDev\Interpreter Python node; In the Python interpreter section click New... and go to the Python.exe file. This will automatically add the needed references to the System Pythonpath. You still nee to add to System Pythonpath the reference to Django; for that you need to click the New folder button and go to the Django installation path.
  9. Donwnload and install Subclipse.

Now you should be able to take your installation for a ride.

  1. Open Eclipse. Choose the path where your workspace will be created. You can go with the default path which is 'C:\Documents and Settings\<current user>\workspace'.
  2. Create a new Python Project. File-New-Project..., select the Pydev project. Type in the name of your first project name. Leave the default options on the page and hit OK. Eclipse just created a new project for you.
  3. Create the first Django site. Open a command prompt, go to the '<Workspace path>\<Project name>\src' folder, and type django-admin startproject firstsite
  4. Go to Eclipse and Refresh the scr node in the project. You should see now the project files created by Django: manage.py, setting.py, urls.py, init.py
  5. Create a run configuration. Select manage.py file in the Package explorer, go to 'Run\Run configurations...', select the Python run, right click on it and choose New.... On the Main tab, set the Project to <Project name>, and the Main module to point to '${workspace_loc:<project name>/src/<site name>/manage.py}' (Replace project name and site name the with the actual name you used when you created the project and the site). Go to the Arguments tab and in the Program arguments type in 'runserver'. Click Apply and then ok. Now if you go to menu 'Run\Run' your first project should be running. Go to a web browser (Firefox is my choice) and type in http://localhost:8000, and you should be able to see the Django default page.


Go HOME

Powered by Google Project Hosting