> > could you explain how this would look in detail? > So I would have a file called settings.py in the modules folder and the > following content: > dbconnection = '...' > > in my model files I could access the variable dbconnection, right? >
Yes, but of course you have to import the settings module first. Maybe at the beginning of your first model file (they are executed alphabetically), do: from gluon.custom_import import track_changes; track_changes(True) import settings Then subsequently in any model files, controllers, or views, you can access settings.dbconnection, etc. > settings.py is only loaded once (I'm not that familiar with modules)? > Yes, it should be (though with track_changes(True) it will automatically be reloaded whenever it changes). > does this also work with compiled applications? > It should. > and with (external) cron jobs? > I believe so, as long as the job runs the application models (where the settings are imported). I suppose it could also import the settings directly. Anthony