Unmanaged Database With Indexing Support #20901
Unanswered
aetherrealm
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a specific use-case where I have Django models for a plugin that I need to be accessible from Netbox directly, and I'd like them to be indexed in the global search. These models are pulling from an external Postgres database, and I have a database router setup for the data. These models are unmanaged (no migrations, etc).
When I got to index the models, I'm running into an error like so
ProgrammingError: relation "django_content_type" does not exist LINE 1: ..."."app_label", "django_content_type"."model" FROM "django_co...when a search is performed. I believe this is because the search requires django_content_type to exist, and even though my database router is only allowing the single model I created to be queried against the external database, django_content_type is expected to exist in that database.
Has anyone run into this before?
Why this level of complexity? I do not want to duplicate this data inside of Netbox as native models that are managed by Django. The dataset is very large, and it would be unreasonable to have a copy of it inside of Netbox as well just to make it "easier". The data should be read only anyways, and separate from the constraints provided by netbox_branching.
Beta Was this translation helpful? Give feedback.
All reactions