简体   繁体   中英

How to create Django browsable REST API without auth or permissions?

I removed admin , auth , permissions , and a few other apps and middleware pieces from my DRF service. I'm running a microservice architecture where each service owns its own database. I don't need Django to pollute all those databases with its own set of auth / user / permissions tables.

Now I'm getting:

Model class django.contrib.auth.models.Permission doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

What is still using the auth models and how do I get rid of it?

More Context:

I want a microservice with only three things:

  1. A REST framework
  2. A database abstraction layer
  3. A browsable API (doesn't have to be HTML, can be pure JSON)

Is it even possible to do such a thing in DRF without having 20 sets of auth tables for 20 databases (for 20 services)?

删除DefaultRouter可使错误消失。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM