tags:

views:

938

answers:

6

I've determined that my local web hosting company cannot support Django.

  • They run Python 2.2.
  • No support for mod_python, FastCGI, or SCGI.
  • No support for mod_rewrite.

Any one of these prevent me from deploying my site as a Django app at that hosting service.

I realize that my site is basically static. I'm wondering if I can use Django caching to the filesystem, and deploy what's in that cache. Or else use wget to recursively capture my site running on localhost. Has anyone done this kind of operation? Is it possible, and is it worth the effort?

I realize that I have at least two other options:

  • Use a PHP CMS solution.
  • Switch my domain to another hosting service.

edit: Thanks everyone for the suggestions! I've sent an email to my hosting provider to give them a chance to offer me an upgrade. If they can't come through, I'm looking at WebFaction as a provider.

+1  A: 

I would say switch to another hosting service. There's actually a french hosting service that supports Django and provides a free hosting package (but you only get 10 MB).

hasen j
+1  A: 

I have used http://www.httrack.com/ a few times to rip a dynamic site to static html, is generally pretty good.

Helpful if you have something like Dreamweaver handy to check all the linkage when you're done, but depends on how big it is.

seanb
Thanks for the suggestion!
Bill Karwin
A: 

Wget has a recursive mirroring option... just google for Wget mirror.

David
+6  A: 

Wget with the "-m" (mirror) switch is probably what you're looking for. The "cleaner" way of doing this might be to just take all of the content that normally would be passed by the context processor and manually compose it into your templates.

As an aside, that's a real bummer, man. The dynamic nature of Django is a large component of what makes it so great. If you're not going to use an absurd amount of transfer (let's say >10 GB), I could probably host you for free.

Andrew
Thanks, that's a very kind offer! I'd like to stick with a hosting service though.
Bill Karwin
+6  A: 

StaticGenerator for Django is what you want. It's designed to pull Django views and save them as static HTML files. It's how I publish my site (http://nedbatchelder.com).

Ned Batchelder
That looks really promising. Thanks!
Bill Karwin
A: 

Either use a PHP CMS solution or get a new host. Why are complicate things even further? (the real question is why are you using Django (or any framework) for a mostly static site?)

The site is static to the reader, but it's still helpful to use a CMS interface for authoring it.
Bill Karwin
thanks for clarification