Django + fcgi = new edits to not shown

I wanted to dive into Python\Django development and used what I had at hands:

  • hosting on Hostgator (not a vps but shared).

They do support Django but through fcgi. I did all what was said in the small guide here

So I got "hello world" working. Though I have a time instead of hello world in my app's

from datetime import datetime
from django.http import HttpResponse
def index(request):
 return HttpResponse('%H:%M:%S'))

But now, when I do any changes to - i can't see resutls immidiately. I do delete all *.pyc files, still nothing. For example even if do this:

return HttpResponse('Hello World!')

I don't get this but still see time.

I'm totaly lost already. I tried many things through ssh with still - I see time.

If I make a mistake in a code - it will catch it up quick (may be not immidiately) and give out error\debug info, but even after that if I correct it to a new code = still the result is time.

Seems like I'm missing something. Some "refresh" function of cache..or smth like that? Restart app?

UPD: kill -USR1 index.fcgi did it!


It's the fcgi!

You probably have to restart the spawned server, so it reloads the Python files.

You can achieve that by touching the .fcgi file:

$ touch index.fcgi

See How to use Django with FastCGI, SCGI, or AJP.

Dreamhost, a Hostgator competitor says that you sometimes need to kill the process:

killall -USR1 index.fcgi

But I don't know if that works with hostgator too.

Need Your Help

Passing Objects as Parameters in javascript function

javascript jquery

I want to pass Objects as parameters to the javascript function and

Cross platform file archiving

c++ cross-platform zip tar compression

I need to archive several files into one file (like a tar file does) programmatically using C++ on both Linux and Windows. It doesn't necessarily need to be a tar file, any compressed/uncompressed ...

Whats the difference between using the clear command and mqget api call to clear a queue?

queue message-queue websphere-mq mq

While clearing the queue in WebSphere MQ, whats the difference between using the clear command and mqget API call ?