Skip to content
This repository was archived by the owner on May 1, 2021. It is now read-only.
This repository was archived by the owner on May 1, 2021. It is now read-only.

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

@lukesneeringer

Description

@lukesneeringer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions