4

As I think I understand it, fabric contains this command which is supposed to configure a server for your mezzanine-django project:

fab all

I get this error:

Aborting, no hosts defined.

The docs for fabric are confusing for me on this aspect. I'm not sure where/how to edit this hosts option.

Thanks, friends.

EDIT Relevant contents of settings.py

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['.domain.com','.domain.com.',]
Joe
  • 115
  • 1
  • 11

1 Answers1

0

There is an example of how to set the hosts configuration in the Mezzanine Deployment documentation (http://mezzanine.jupo.org/docs/deployment.html#configuration)

David Ray
  • 76
  • 1
  • 2
  • I am aware of this information. In settings.py for the project they are commented out. It says: # These settings are used by the default fabfile.py provided. # Check fabfile.py for defaults. Because of this, I'm not sure if I should paste this into fabfile, or just uncomment it in settings.py. Also, because the fields look like environment variables, I'm not sure if they need to be defined somewhere else. – Joe Jan 08 '15 at 20:28
  • So I've copied this bit of code into local_settings.py. "HOSTS": ALLOWED_HOSTS ['.mydomain.com'] is returning a ALLOWED_HOSTS not defined error. Trying to assign the ALLOWED_HOSTS with an equal sign is bad syntax. Not sure where to go from here – Joe Jan 08 '15 at 21:09
  • You need to define ALLOWED_HOSTS prior to the FABRIC dictionary definition: https://docs.djangoproject.com/en/1.7/ref/settings/#allowed-hosts – David Ray Jan 09 '15 at 12:12
  • 1
    I updated my post with contents of settings.py. From the documentation it seems like this is correct. – Joe Jan 09 '15 at 22:29