code, reviews...
I managed to set up disconnected Django development on my Macbook Pro. Unfortunately, I could not get it working with fastcgi or mod_python and Apache so that I could have a separate server instance serving static content like on my live site(as well as faster speeds) but what I have works well enough for disconnected development.
The way I got this working was to install Subversion on my web server for version control and import all of my files into it. I then checked everything out from SVN to ~/Sites/ so I'd have a working copy to do my changes on.
It's at this point that I tried running my application, and received notification that I didn't have the Django libraries in my PYTHONPATH. Ah, okay - so... >cd /usr/local/lib/python2.5/
>svn co http://code.djangoproject.com/svn/django/trunk/ Alright! Then I needed to set up a few symlinks for some custom Python libraries I created that were in version control. After all my Python paths were set up, all that remained was configuring my application's settings.py to have the correct paths to my static content, and updating my urls.py to serve static content through Django.if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/chrisczub/Sites/czubus/webapps/static'}),
)That has the nice feature of only serving static content though the Django development server if the DEBUG flag was enabled, which I keep disabled on my live site. After setting everything up, manage.py runserver and I was in business.
I would like to get things running with FastCGI on my Macbook, however. There is a guide on the Django website, but I was unable to get my httpd server to point to the content served by fastcgi. More experimentation is needed.
Updating to the 1.0 release of Django b0rked them up and I need to figure it out.