V
V
Valery Semenov2012-09-23 14:49:13
Python
Valery Semenov, 2012-09-23 14:49:13

pyramid configuration. How to use it?

1. The settings required by the models are placed in the development.ini config.
2. Models get a config like this:

def get_config(key): registry = pyramid.threadlocal.get_current_registry() return registry.settings[key]

3. When I run tests, for some reason the models don't get a config. Problem.

How should you use a config in a pyramid, or even better with your own test data?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question