How To Convert An Existing Django Project To Eclipse Project

mainSo you have a Django project and you want to use Eclipse IDE to modify and control it. When I say “existing Django project”, I mean a Django project created without using Eclipse. If you are not sure how to use Eclipse to manage your Python project, you can check out this blog post. You basically need to install PyDev and configure the Python path for Eclipse. Once you install everything, you should be able to see PyDev listed when you start a new Eclipse project.  

Coming back to the problem at hand, let’s say you have a Django project named “mysite”. This is the main folder which contains,, etc. Navigate to this folder on your terminal and create a file named .project:

$ cd /path/to/mysite
$ vi .project

Inside this file, paste the following code:

<?xml version="1.0" encoding="UTF-8"?>

Now create another file named .pydevproject:

$ vi .pydevproject

Add the following content to that file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>

For the PROJECT_SOURCE_PATH in this file (the path in line 10), the apps are usually placed inside the mysite/apps/ directory. Make sure you change this path if you have placed your source in a different folder.

Now open Eclipse and choose “File > Import”. Navigate to “mysite” and choose that as your location. Eclipse should recognize this as an Eclipse project and import it to your workspace. And we are done! You are good to go.


4 thoughts on “How To Convert An Existing Django Project To Eclipse Project

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s