ASKBOT / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
1.56k stars 626 forks source link

Hostname should accept localhost #909

Closed EvanCarroll closed 2 years ago

EvanCarroll commented 2 years ago

Currently I can't provide my hostname of localhost to askbot-setup

askbot-setup --noinput --root-directory=askbot_site --db-engine postgresql --db-name postgres --db-user postgres --db-password foobar --db-host=localhost --db-port=5432 --admin-name "Evan Carroll" --admin-email 'me@evancarroll.com'

If I try that, I'll get,

Error: value of --db-host is invalid

However, that should be valid, as if I run instead with localhost.localdomain,

askbot-setup --noinput --root-directory=askbot_site --db-engine postgresql --db-name postgres --db-user postgres --db-password foobar --db-host=localhost.localdomain --db-port=5432 --admin-name "Evan Carroll" --admin-email 'me@evancarroll.com'

And, then I change I open ./askbot_site/setting.py and change

'HOST': 'localhost.localdomain'

To

'HOST': 'localhost'

Everything works fine. You need your hostname to be set on PostgreSQL because localhost means TCP/IP and unset means UDP.

You also can't do it through inactive prompt. It'll just say invalid and prompt you again.

EvanCarroll commented 2 years ago

Also probably worth mention --db-host should also accept IP addresses. It currently does not.