Using Django with Eclipse Tutorial: http://pydev.org/manual_adv_django.html
Lessons Learnt:
Concept 1: Django Integration in PyDev requires 3 Configurations
Concept 2: Creating a New Django Project in Eclipse (satisfies the above 3 configurations) = django.admin.py startProject <pjname>
Concept 3: You can also set an existing project as a Django project but manual configurations will be needed
Concept 4: django actions can be accessed right-click project > Django = manage.py syncdb/runserver
Concept 5: Interactive Shell w Django has Auto-Completion!
right-click project > Django > Shell with django environment
Concept 6: Running/Debugging as Django
Run: default settings has “–noreload” i.e. code changes will not be updated until next run
Run (remove –noreload): bad side effect as spawned processes are left alive in auto-reload
Run (remove –noreload + change manage.py): spawned children processes will have console outside eclipse which can be killed by Ctrl+C. See below “Run Django with autoreload”, or screen shot here:
Error
1. if you get an error “unresolved import: pydevd” try saving the file ‘manage.py’ first. the error should go away.
2. If the error persists: you need to make sure pydev is in your PYTHONPATH.
a) Go to Eclipse>Preferences>PyDev>Python Interpreter:
b) Click New Folder> (mac)”/Applications/Eclipse/plugins/org.python.pydev_x.x.x.x/pysrc”
c) Click “Apply” This adds the folder that contains pydevd.py to your PYTHONPATH. Eclipse automatically adds that to your project’s Python Library. This should resolve the problem and you can run it now.
Latest Note: Still Does Not Work. Run into errors. Need to come back and figure out HOW TO RUN WITH AUTORELOAD.
Concept 7: Use Remote Debugger to debug (allows debugging of Django projects using breakpoints)
link to use Remote Debugger