Authing Django Patches on DreamHost

software development

#1

Hi all,

Has anyone authored patches to Django on DreamHost? I’m having trouble getting Django to recognize the changes to my classes, any pointers?


#2
  1. Make sure you’re forcing a complete reload when you make changes. Python doesn’t check for changes to source files, so the original code will keep running until it’s killed (either for inactivity or manually).

  2. We recently installed Django 1.1.1 in the system Python directory. If you have your own copy, make sure that it’s being added to sys.path before the default entries. (Easiest way to do this is with sys.path.insert(1, “/home/username/mystuff”) instead of sys.path += “…” or sys.path.append("…") in dispatch.fcgi or passenger_wsgi.py.)


#3

I’m assuming by forcing a complete reload you mean running “pkill python” or “pkill dispatch.fcgi”. Correct?

Thanks for the help!


#4

Yep, “pkill python” away!

Incidentally, if you aren’t already using Passenger, we have a new procedure written up for using it to serve Django applications, detailed at http://wiki.dreamhost.com/Django. The instructions are geared at new-application setups, but it shouldn’t be too hard to drop an existing application into them.