ConfigError with Multiple NinjaAPI Instances in Django Project #1098
Unanswered
blazstefin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my Django project, I'm encountering a ConfigError when trying to register routes for a single instance of NinjaAPI. Despite only creating one API instance, the error suggests that multiple NinjaAPIs or TestClients are registered, requiring unique versioning or URL namespaces. This issue arises when including the API's URLs in the core.urls.py file.
Error:
Setup:
core/api.py
locations/api.py
core/urls.py
Expected Behavior:
The application should recognize the single instance of NinjaAPI without throwing a ConfigError about multiple instances.
Actual Behavior:
A ConfigError is raised, suggesting there are multiple NinjaAPI instances or TestClients, despite there being only one defined in the project.
Environment:
Django version= 4.2.7
Django Ninja version= 1.1.0
Beta Was this translation helpful? Give feedback.
All reactions