<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using Eclipse and PyDev for&#160;django</title>
	<atom:link href="http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/</link>
	<description>Sam Newman's blog</description>
	<pubDate>Mon, 06 Oct 2008 23:44:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: rodin</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-63919</link>
		<dc:creator>rodin</dc:creator>
		<pubDate>Fri, 12 Oct 2007 06:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-63919</guid>
		<description>Thank you, it's very helpful!</description>
		<content:encoded><![CDATA[<p>Thank you, it&#8217;s very helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-17718</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Mon, 09 Apr 2007 11:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-17718</guid>
		<description>Nice one - thanks for the tip Samuel</description>
		<content:encoded><![CDATA[<p>Nice one &#8211; thanks for the tip Samuel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Adam</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-17391</link>
		<dc:creator>Samuel Adam</dc:creator>
		<pubDate>Fri, 06 Apr 2007 16:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-17391</guid>
		<description>About the unresolved imports...

Lets say you import your models like that:
from my_project.my_app.models import Model

And your system path for the project is:
c:\my_web_projects\my_project\

Inside Eclipse :
Window menu &#62; Preferences...
Pydev &#62; Interpreter - Python
System PYTHONPATH &#62; New Folder
Folder : c:\my_web_projects\

And that should do the trick ! 

People often use to make the mistake of adding c:\my_web_projects\my_project\</description>
		<content:encoded><![CDATA[<p>About the unresolved imports&#8230;</p>
<p>Lets say you import your models like that:<br />
from my_project.my_app.models import Model</p>
<p>And your system path for the project is:<br />
c:\my_web_projects\my_project\</p>
<p>Inside Eclipse :<br />
Window menu > Preferences&#8230;<br />
Pydev > Interpreter &#8211; Python<br />
System PYTHONPATH > New Folder<br />
Folder : c:\my_web_projects\</p>
<p>And that should do the trick ! </p>
<p>People often use to make the mistake of adding c:\my_web_projects\my_project\</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramin</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6309</link>
		<dc:creator>Ramin</dc:creator>
		<pubDate>Fri, 15 Dec 2006 21:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6309</guid>
		<description>A couple more things:

- You don't need to move your sources into 'src,' but you may have to create a dummy 'src' directory just to keep PyDev happy. Actually moving your files into the 'src' subdirectory will screw up the url defaults, so you'll have to tweak urls.py and settings.py if you really want to do it. It's a big pain. Might as well leave them in the top-level directory.

- Set up to run manage.py as described above, but to kill the runserver session, you HAVE TO hit the red 'terminate' square on the console toolbar BEFORE you run again. If you forget to terminate before running (or debugging) again, you'll end up with the dread 'address in use' problem and you'll have to manually hunt down the process and kill it. After the third or fourth time you forget, it'll become a dog-bell-drooling sort of thing. Meanwhile, you might want to make sure you do your development out of the earshot of impressionable children.

- Debugging the source works great! I've always been a fan of the Eclipse debugger. I especially like how much context information the Eclipse debugger provides when you inspect various django-related objects.  Don't forget to terminate the session, otherwise the port stays locked up.

- If you're using the development branch of Django off the subversion repository, the instructions say that you should not install django using the 'setup.py install' command, but instead to create a symbolic link in the python 'site-packages' directory. That way, you just do an SVN update and you're good to go. PyDev/Eclipse, however, likes to scan the python path tree and build a reference cache. So if you're using the Django development branch, remember to look in the Pydev Python interpreter preferences (as described above) , remove the item, then add it in again so the cache gets rebuilt.

- Somewhere along the line, the redlined Django import problems seem to have gone away. Not sure why. Not that I'm complaining or anything ...

- Given the above hassles, I'm not sure I'm ready to switch over Django development to PyDev yet. The debugger is a lot better than Komodo, but the rest of the workflow is a pain. Like I said in a previous post, the integration with AJAX debugging may be enough to make one overlook the pain points. YMMV.</description>
		<content:encoded><![CDATA[<p>A couple more things:</p>
<p> &#8211; You don&#8217;t need to move your sources into &#8216;src,&#8217; but you may have to create a dummy &#8216;src&#8217; directory just to keep PyDev happy. Actually moving your files into the &#8216;src&#8217; subdirectory will screw up the <acronym title="Uniform Resource Locator">URL</acronym> defaults, so you&#8217;ll have to tweak urls.py and settings.py if you really want to do it. It&#8217;s a big pain. Might as well leave them in the top-level directory.<br />
 &#8211; Set up to run manage.py as described above, but to kill the runserver session, you HAVE TO hit the red &#8216;terminate&#8217; square on the console toolbar BEFORE you run again. If you forget to terminate before running (or debugging) again, you&#8217;ll end up with the dread &#8216;address in use&#8217; problem and you&#8217;ll have to manually hunt down the process and kill it. After the third or fourth time you forget, it&#8217;ll become a dog-bell-drooling sort of thing. Meanwhile, you might want to make sure you do your development out of the earshot of impressionable children.<br />
 &#8211; Debugging the source works great! I&#8217;ve always been a fan of the Eclipse debugger. I especially like how much context information the Eclipse debugger provides when you inspect various django-related objects.  Don&#8217;t forget to terminate the session, otherwise the port stays locked up.<br />
 &#8211; If you&#8217;re using the development branch of Django off the subversion repository, the instructions say that you should not install django using the &#8216;setup.py install&#8217; command, but instead to create a symbolic link in the python &#8216;site-packages&#8217; directory. That way, you just do an SVN update and you&#8217;re good to go. PyDev/Eclipse, however, likes to scan the python path tree and build a reference cache. So if you&#8217;re using the Django development branch, remember to look in the Pydev Python interpreter preferences (as described above) , remove the item, then add it in again so the cache gets rebuilt.<br />
 &#8211; Somewhere along the line, the redlined Django import problems seem to have gone away. Not sure why. Not that I&#8217;m complaining or anything &#8230;<br />
 &#8211; Given the above hassles, I&#8217;m not sure I&#8217;m ready to switch over Django development to PyDev yet. The debugger is a lot better than Komodo, but the rest of the workflow is a pain. Like I said in a previous post, the integration with AJAX debugging may be enough to make one overlook the pain points. YMMV.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramin</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6307</link>
		<dc:creator>Ramin</dc:creator>
		<pubDate>Fri, 15 Dec 2006 20:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6307</guid>
		<description>Once the webserver is running (manage.py—noreload) how can the server be stopped?

That's the problem I was having. After the first run, it kept telling me that port 8000 was already taken. I ended up having to drop down to the shell and manually kill the process.

I tried this last night. PyDev redlining all the django imports made me think that the whole thing was hopeless. Good to hear that it still can work.

I'd love it if I could consolidate Eclipse, PyDev, Django, Aptana, and YUI into one development environment. As it stands, I'm spread out over Komodo, Eclipse/Aptana, Dreamweaver, shell, and a number of specialized text editors. Makes it hard to think straight :-)

BTW, in theory, it should be possible to use Aptana's javascript actions to run boilerplate django command-line stuff (like project creation, db synching, etc.) since their actions can shell out. I haven't tried it, but all the bits look to be there.</description>
		<content:encoded><![CDATA[<p>Once the webserver is running (manage.py—noreload) how can the server be stopped?</p>
<p>That&#8217;s the problem I was having. After the first run, it kept telling me that port 8000 was already taken. I ended up having to drop down to the shell and manually kill the process.</p>
<p>I tried this last night. PyDev redlining all the django imports made me think that the whole thing was hopeless. Good to hear that it still can work.</p>
<p>I&#8217;d love it if I could consolidate Eclipse, PyDev, Django, Aptana, and YUI into one development environment. As it stands, I&#8217;m spread out over Komodo, Eclipse/Aptana, Dreamweaver, shell, and a number of specialized text editors. Makes it hard to think straight :-)</p>
<p><acronym title="By The Way">BTW</acronym>, in theory, it should be possible to use Aptana&#8217;s javascript actions to run boilerplate django command-line stuff (like project creation, db synching, etc.) since their actions can shell out. I haven&#8217;t tried it, but all the bits look to be there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6163</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Tue, 12 Dec 2006 20:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-6163</guid>
		<description>Once the webserver is running (manage.py --noreload) how can the server be stopped?</description>
		<content:encoded><![CDATA[<p>Once the webserver is running (manage.py&#8212;noreload) how can the server be stopped?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NiCoS</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3784</link>
		<dc:creator>NiCoS</dc:creator>
		<pubDate>Tue, 10 Oct 2006 19:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3784</guid>
		<description>Indeed, we need a "source directory" but it can be set at project level : 

See : http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html#116048251566601515

I'll see how does it work soon...</description>
		<content:encoded><![CDATA[<p>Indeed, we need a &#8220;source directory&#8221; but it can be set at project level : </p>
<p>See : <a href="http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html#116048251566601515"  rel="nofollow">http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html#116048251566601515</a></p>
<p>I&#8217;ll see how does it work soon&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam newman</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3772</link>
		<dc:creator>sam newman</dc:creator>
		<pubDate>Tue, 10 Oct 2006 09:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3772</guid>
		<description>django-admin.py startproject mysite is typed into a console, and I created a src directory as the PyDev documentation seemed pretty certain it needed it.

I'm still trying to fix the 'unresolved import' issues - I'll post an update when done.</description>
		<content:encoded><![CDATA[<p>django-admin.py startproject mysite is typed into a console, and I created a src directory as the PyDev documentation seemed pretty certain it needed it.</p>
<p>I&#8217;m still trying to fix the &#8216;unresolved import&#8217; issues &#8211; I&#8217;ll post an update when done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NiCoS</title>
		<link>http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3760</link>
		<dc:creator>NiCoS</dc:creator>
		<pubDate>Mon, 09 Oct 2006 20:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/blog/2006/10/09/using-eclipse-and-pydev-for-django/#comment-3760</guid>
		<description>Hi,

2 questions :

1. django-admin.py startproject mysite is typed into eclipse console or in a term ?

2. Why do you need to create a src directory ? I think you do not need it, it seems to work without moving everything to src directory.

Nicolas</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>2 questions :</p>
<p>1. django-admin.py startproject mysite is typed into eclipse console or in a term ?</p>
<p>2. Why do you need to create a src directory ? I think you do not need it, it seems to work without moving everything to src directory.</p>
<p>Nicolas</p>
]]></content:encoded>
	</item>
</channel>
</rss>
