How To Create A Django Project Using Eclipse And XAMPP
If you are looking for how to set up your first django project using Eclipse as the IDE and XAMPP as the server, this would be the right step-by-step tutorial for you. Besides that, you can also learn how to set up virtual hosts for your testing server applications.
There are 10 steps to do this which are listed below:
1) Installing Python 2.7
Download Link: Python Download Page
2) Installing Django (preferably 1.3 but you can install the latest version if it's backward compatible)
Download Link: https://www.djangoproject.com/
Screenshots are given below.
3) Installing XAMPP
Download Link: http://www.apachefriends.org/en/xampp.html
After XAMPP is installed, you can have access to MySQL and Apache server through XAMPP control panel. You can turn on or off their services easily.
4) Changing the configuration of XAMPP:
- Password for MySQL: OPTIONAL
- Password in config file of PHPMyAdmin: If you have changed the password for MySQL
- HTTP Port for Apache: OPTIONAL so that you don't have to type http://localhost:8080
5) Changing host file on Windows
Doing this helps you set up the URL for your testing server application such as http://your-app.com instead of http://localhost
6) Installing mod_wsgi
The aim of mod_wsgi is to implement a simple to use Apache module which can host any Python application which supports the Python WSGI interface.
7) Download Eclipse and Install PyDev.
PyDev is a third-party plugin for Eclipse which gives us auto-completion and many cool features. Eclipse Download Link: http://www.eclipse.org/downloads/
See the screenshots below for how to install PyDev. 8) Setting up a Django project in Eclipse
9) Setting up a virtual host for your application
10) Turning on XAMPP Apache and MySQL
11) Opening up your application by typing http://your-test-server.com in the browser
- Step 2 - Installing Django
- Step 4 - Changing XAMPP Configuration
- Step 5 - Changing Windows Host File
- Step 6 - Installing WSGI for Python
- Step 7 - Installing PyDev in Eclipse
- Step 8 - Setting up Django Projects In Eclipse
- Step 9 - Setting up a virtual host
- Step 9 - Sample Code
- Sample Code - myproject.wsgi
1)How To Run A Python Application In Windows
2)Django Syncdb Error - Table Doesn't Exist
3)Do NoFollow Links Get Ranked
4)Failed To Fetch URL - Android SDK Manager
5)How To Set Up Virtual Hosts in XAMPP For Windows