I have a special id in my database that sets polymorphism in my
SQLAlchemy classes.

To not hardcode it in models I put the value in the ini file.

Now the suggested method to retrieve it is to use
`pyramid.threadlocal.get_current_registry().settings` (I have no
`request` in models classes) as stared here:

https://docs.pylonsproject.org/projects/pyramid/1.2/api/settings.html?highlight=settings#pyramid.settings

This works while serving (`paster serve`) even thought only _inside_
classes and not at module level so I can't retrieve it once but every
time an instance is created...

**But**

it's not available in `paster setup-app` where I wrote script to init
my db and prefill with data, hence the need to get that value from ini
file.

My need is a safe way to access settings dictionary within my Pyramid
app whenever I'm serving or not.

Any clue?

Thanks for your support
neurino

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to