python manage.py createsuperuser threw the same ALLOWED_HOSTS error and then prompted me to put in a user, email, and password. I entered info, then ran the server. The admin still won't let me log in.
About having to create another settings.py file, I'm not sure. I guess maybe the theme points to a settings.py file at the root, and the Mezzanine 4 install maybe isn't looking there. It seems the install wants the settings.py file in the subdirectory, and the theme (which was I assume set up for an earlier version of mezzanine) wants a settings.py file at the root. On Wednesday, August 12, 2015 at 6:00:11 PM UTC-7, Avery Laird wrote: > > Hi Geoff, > > To get rid of the ALLOWED_HOSTS issue, you can add 'localhost' to the list > of ALLOWED_HOSTS in `project/local_settings.py`. > > Out of curiosity, what happens when you try to create a user using the > command line? eg, `python manage.py createsuperuser`? Also, what caused you > to have to create another `settings.py` file? This might help with the > troubleshooting > > > On Wednesday, 12 August 2015 16:04:10 UTC-7, Geoff P wrote: >> >> Hello, designer here attempting obtain skills with Django and Mezzanine >> (actually it's a project for work). I've installed a theme from Mezzatheme >> called "Singularity". >> >> I've gone over the readme. The first step suggests setting a homepage >> from the admin, but I can't get into the admin with the default user:* >> admin* and password: *default*. I've installed on my localhost. >> >> At first I had some trouble even installing the theme (app). The old >> mezzanine installed with a settings.py file at the root of the project, >> then you could put your theme folder in the project and change the >> settings.py file to include the theme app. Now I see that when I set up a >> Mezzanine project with Mezzanine 4, the settings.py, local_settings.py, >> urls.py and, wsgi.py, are actually placed in a subdirectory of the project >> with the same name of its parent folder. In order to install the >> Singularity theme I had to change the settings.py file in that subdirectory >> and I also had to add a settings.py file to the project root. Then I had to >> add 'theme,' to INSTALLED_APPS in both settings.py files in order for the >> server to run the site. With all that said, I'm able to runserver - I think >> everything looks right, except I can't log in to the admin. >> >> I did notice when running the server that I get an error: "UserError: You >> haven't defined the ALLOWED_HOST settings, which Django requires. Will fall >> back to the domains configured as sites. " >> >> Do I need to do something with the database? Do I have the setup wrong? >> Miss a step? Sorry for the rambling. I've been working with Python and >> Django steadily, but as you can see I'm not up to par. Thanks. >> >> >> > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
