Re: [mezzanine-users] Re: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

2018-01-08 Thread Ryne Everett
You might try raising an exception on the first line of local_settings.py just 
to make sure it’s being imported.

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

2018-01-08 Thread Peter Chen
My project looks exactly like that. I followed the structure of 4.2.3 and 
modified the old settings.py according to the new settings.py

On Sunday, January 7, 2018 at 10:05:34 PM UTC-5, Ryne Everett wrote:
>
> I would follow the flow of execution to ensure your local_settings are 
> being sourced. For example, in the default project template: 
>
> 1. You're running makemigrations through manage.py which defines 
> DJANGO_SETTINGS_MODULE as the settings.py file in your main project 
> directory. 
>
> settings_module = "%s.settings" % real_project_name("{{ project_name 
> }}") 
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module) 
>
> 2. The settings.py looks for a local_settings.py file in the 
> main project directory and imports it. 
>
> f = os.path.join(PROJECT_APP_PATH, "local_settings.py") 
> if os.path.exists(f): 
> import sys 
> import imp 
> module_name = "%s.local_settings" % PROJECT_APP 
> module = imp.new_module(module_name) 
> module.__file__ = f 
> sys.modules[module_name] = module 
> exec(open(f, "rb").read()) 
>
> If your project looks different than the default, that would be 
> noteworthy. 
>

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.