Plugin: Load Postgres view into netbox view for fill a table. #16401
Unanswered
Brescou
asked this question in
Help Wanted!
Replies: 1 comment 1 reply
-
AFAIK there's no native support in Django for PostgreSQL views, unfortunately. You might look into the django-pgviews package for this; I haven't tried it myself. A simpler solution would be to create the view(s) manually and use the ORM's |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
I'm working on a NetBox plugin and need some help. I want to load data from a PostgreSQL view into a NetBox view to populate a table. Here's what I'm trying to do:
What I'm trying to achieve:
I want a table in a NetBox view to show data from a PostgreSQL view. This data should be fetched dynamically and displayed within NetBox.
Setup:
NetBox version: 4.0.3-dev
PostgreSQL version: 16
Plugin: Custom plugin in development
Questions:
What's the best way to connect a PostgreSQL view to a NetBox view?
Are there any examples or docs that show how to do this?
How can I make sure the data is dynamically fetched and refreshed in the NetBox view?
Any potential issues or things to watch out for?
Extra info:
I know a bit about Django and the NetBox plugin setup but I'm pretty new to PostgreSQL views. Any code examples, links, or tips would be awesome.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions