ptahproject/ptah — Issue #55: module level imports of settings should assert and raise a sensible error
Author: bobdobbs666
Created: 2011-11-03 23:07:35+00:00
State: open

so currently if you from myapp.settings import config
config['mysetting'] will raise an Exception inside the registry. if you try to get a value from module level.

That is ok. But the exception should be sensible. It should be an assert and ensure that when you
reference a value from settings at module level it should say "You can not important settings at module scope do this inside a function or class method"