Lack of defined hostname executes a print statement, raising IOError in mod_wsgi #3

lukesneeringer opened this Issue Apr 1, 2011 · 0 comments


None yet
1 participant

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 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?)

mdippery referenced this issue in mdippery/staticgenerator Nov 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment