Files @ 1e119efb7ac2
Branch filter:

Location: website/compile-all.py

bkuhn
Incorporate conservancy_ssl middleware, etc. into main site, now that HTTPS fully supported.

Previously, SSL on sfconservancy.org was supported using a self-signed cert
only to handle the /admin/ portion of the site. Now that SSL is supported
site-wide, and perfectly mirrors the content available via HTTP, the
conservancy_ssl middleware, URLs, and settings are wholly deprecated and
herein removed.

The main site's urls.py now need adjusting to support /admin/, but additional
code is needed in middleware.py to avoid accidentally serving /admin/ via
HTTP instead of HTTPS.

The latter code is untested; hopefully it works "out of the box". :)
#!/usr/bin/python

import compileall
import os
#compileall.compile_dir("www", force=1)
#

def compileDir(arg, directory, names):
    compileall.compile_dir(directory, force=1)

os.path.walk("www", compileDir, "")

os.system("find www -type d -exec chmod gu+rx {} \;")
os.system("find www -type f -exec chmod gu+r {} \;")
os.system("find www -type d -exec chmod o+x {} \;")
os.system("find www/conservancy/static -type d -exec chmod o+rx {} \;")
os.system("find www/conservancy/static  -exec chmod o+r {} \;")
os.system("find www -exec chgrp www-data {} \;")
os.system("find www -exec chmod go-w {} \;")