Skip to content

Django ORM does not work well with IDOM #79

Closed
@Archmonger

Description

@Archmonger

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

  1. Create a React-style hooks to perform ORM CRUD
  2. Set DJANGO_ALLOW_ASYNC_UNSAFE when within a component rendering context.
  3. Create a hook that utilizes database_sync_to_async that can perform ORM queries

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions