staticgenerator
staticgenerator copied to clipboard
Lack of defined hostname executes a print statement, raising IOError in mod_wsgi
If you don't have a value in settings.SERVER_NAME and aren't using django.contrib.sites, staticgenerator assumes localhost, but not before it issues a warning...by using a print statement. Since mod_wsgi doesn't let you print, this raises IOError and gives you a very unfriendly 500 page and a message in your error log. This really should be using warnings.warn instead. Better yet, it should just not issue a warning at all (why does it matter if it's set to localhost if you're not using the sites framework?)