I do

A_settings.py # global settings and flags
B_w2p.py # web2py related things, auth/crud/service declarations
C_modelA.py
D_modelB.py #relies on model a so it executes after

-Thadeus





On Sun, Feb 28, 2010 at 5:19 AM, Guido Kollerie <[email protected]> wrote:
> I'd like to have one file with configurable settings instead of having
> these settings spread out over mulitple models and controllers. What's
> the best practise for this?
>
> My solution is to create a '_settings.py' model. I prepended it with an
> underscore to ensure it is the first excuted model file. This way the
> settings in it can be used by other model files, most notable db.py.
> This works under OS X, though I am not sure if this is a cross platform
> safe way to ensure _settings.py is actually loaded first.
>
> Reason for not simply including all settings in db.py is that I do
> want to check in db.py in my DVCS, but not the settings such as DB
> password, password of the SMTP user, and other potentially sensitive
> information.
>
> Thoughts?
>
> --
> Guido Kollerie
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to