Open
Description
Describe the problem
When used in an async view, you need to access the object with a sync_to_async
wrapper or this error will get raised:
SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async
Steps to reproduce
Create an async view in Django 3.1 and try to access an attribute of the config
object.
System configuration
- Django version: 3.1
- Python version: 3.9
- Django-Constance version: 2.8.0
Metadata
Assignees
Labels
No labels