Commit graph

7 commits

Author SHA1 Message Date
Pavel Savchenko
3883cc4fe4 Docs: explicitly describe property in patterns.rst (#189)
Hopefully this saves time for new users of django-configuration (like myself), who "just needed" to lazily evaluate a string inside a dictionary.

This doubles as an example for `RAVEN_CONFIG` which was the whole reason I was here in the first place... The actual problem I faced was that a setting remains of type `values.Value` when nested inside a dictionary. Which results in a weird issues like this:

```
2018-02-24T20:59:26.125208+00:00 app[web.1]: Traceback (most recent call last):
2018-02-24T20:59:26.125364+00:00 app[web.1]:     self.client.http_context(self.get_http_context(environ))
2018-02-24T20:59:26.125215+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/middleware.py", line 98, in __call__
2018-02-24T20:59:26.125368+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/contrib/django/models.py", line 54, in <lambda>
2018-02-24T20:59:26.125482+00:00 app[web.1]:     __getattr__ = lambda x, o: getattr(get_client(), o)
2018-02-24T20:59:26.125486+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/contrib/django/models.py", line 134, in get_client
2018-02-24T20:59:26.125613+00:00 app[web.1]:     instance = Client(**options)
2018-02-24T20:59:26.125618+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/contrib/django/client.py", line 147, in __init__
2018-02-24T20:59:26.125769+00:00 app[web.1]:     Client.__init__(self, *args, **kwargs)
2018-02-24T20:59:26.125771+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/base.py", line 171, in __init__
2018-02-24T20:59:26.125927+00:00 app[web.1]:     self.set_dsn(dsn, transport)
2018-02-24T20:59:26.125929+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/raven/base.py", line 251, in set_dsn
2018-02-24T20:59:26.126063+00:00 app[web.1]:     if dsn not in self._transport_cache:
2018-02-24T20:59:26.126076+00:00 app[web.1]: TypeError: unhashable type: 'Value'
```
2018-02-27 21:43:18 +01:00
Daniel Hahler
abe1890c5b Merge pull request #142 from mauricioabreu/add-standalone-script-doc
Add documentation for standalone scripts
2016-01-12 15:42:10 +01:00
Mauricio de Abreu Antunes
6d52e560a3 Add documentation for standalone scripts 2016-01-12 12:22:08 -02:00
Mauricio de Abreu Antunes
0a4cae9c2b Handle example usage for Django 1.9
Django 1.9 makes the languages setting a list of tuples.
2016-01-08 18:27:30 -02:00
Nikolai Prokoschenko
d97afc163a Correct documentation about mixin usage
`Configuration` class needs to be last in the inheritance list, otherwise it's not possible to override Django's default settings. Tests are already correct, just the documentation is wrong.
2014-10-20 11:06:05 +02:00
Jannis Leidel
cd2144492c Minor edits to the docs. 2013-09-03 13:03:59 +02:00
Jannis Leidel
1a54847375 Added a configuration values system.
This also adds some advanced features like a setup classmethod to the Configuration class.
Reorganized and extended the documentation.
2013-07-27 12:37:28 +02:00