Looks like you created multiple NinjaAPIs
See original GitHub issueHi there, I was playing around a bit with the basic tutorial (it worked perfectly in the beginning) and got this error at some point:
File "/django/django_aia_backend/django_aia_backend/urls.py", line 31, in <module>
path('api/', include(api.urls)),
File "/djangovenv/lib/python3.9/site-packages/ninja/main.py", line 314, in urls
self._validate()
File "/djangovenv/lib/python3.9/site-packages/ninja/main.py", line 398, in _validate
raise ConfigError("\n".join(msg))
ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs
To let ninja distinguish them you need to set either unique version or url_namespace
- NinjaAPI(..., version='2.0.0')
- NinjaAPI(..., urls_namespace='otherapi')
Already registered: ['api-1.0.0']
not sure what is the problem here. I only have one instantiation of NinjaAPI. I tried giving it a specific version name but that does not change anything.
To be fair, I played around a bit before, among other things creating a django app called ‘api’ for using standard DRF. I deleted this and every reference to it, but even after starting a brand new django project, the error persists. Does the api instantiation get persisted somewhere in venv? I cannot explain otherwise why this happens.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
NinjaAPI class - Django Ninja
Django Ninja - Django REST framework with high performance, easy to learn, fast to code.
Read more >Trying Out Django Ninja - Part 1 - Peter Simpson
Now we are ready to install Django Ninja and create the API endpoints: ... A succesful reponse body to called that endpoint might...
Read more >django-ninja - Python Package Health Analysis - Snyk
Ensure you're using the healthiest python packages ... Get started free ... Looks like django-ninja is missing a security policy.
Read more >ninjaAPI Integration - Google Sites
Order API (An API for creating delivery orders, generating waybills, ... You (the shipper) inform us (Ninja Van) that you would like to...
Read more >Beware: A ninja is shadowing Sebastian from FastAPI
Fast to code: Type hints and automatic docs lets you focus only on business ... boto3 types update (via Dean Langsam) - seems...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
maybe this could be helpful [https://django-ninja.rest-framework.com/guides/routers/]
@Raketuv @twentyforty Please try latest (0.16.1) version