Description
Current Situation
Currently, the Django ORM will shoot out a SynchronousOnlyOperation
if used within a IDOM component. This is caused by Django's current limitation surrounding mixed sync-async contexts.
Proposed Actions
Choose one of the following
- Create a React-style hooks to perform ORM CRUD
- Set
DJANGO_ALLOW_ASYNC_UNSAFE
when within a component rendering context. - Create a hook that utilizes
database_sync_to_async
that can perform ORM queries