Netbox plugin to manage attachments for any model
Project description
NetBox Attachments Plugin
Netbox plugin for attaching files to any model.
Features
This plugin provide following Models:
- NetBoxAttachment
Compatibility
Netbox | Plugin |
---|---|
>= 3.3.4 | 0.0.0 <-> 0.0.5 |
>= 3.4.0 | 0.0.6 <-> 1.0.6 |
>= 3.4.3 | 1.0.7 <-> 1.1.X |
Installation
The plugin is available as a Python package in pypi and can be installed with pip
pip install netbox-attachments
Enable the plugin in configuration.py
:
PLUGINS = ['netbox_attachments']
Restart NetBox and add netbox-attachments
to your local_requirements.txt
See NetBox Documentation for details
Configuration
The following options are available:
apps
:- Type: List
- Default: ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless']
- Description: Display
Attachments
feature on all models definded under the app label. Attachmets are displayed onright_page
of the detail-view of model.
display_default
:- Type: String
- Default: "additional_tab"
- Options: "left_page", "right_page", "full_width_page", "additional_tab"
- Description: Setup default setting of where attachments should be displayed under the models
display_setting
:- Type: Dict
- Default: {}
- Options: {<app_label.model>: <prefeered_display>}
- Example: {'dcim.devicerole': 'full_width_page', 'dcim.device': 'left_page', 'ipam.vlan': 'additional_tab'}
- Description: Set display setting for concrete model
- Tip: Proper
app_label
andmodel
names could be found at API<your_netbox_url>/api/extras/content-types/
Configuration Example:
PLUGINS_CONFIG = {
'netbox_attachments': {
'apps': ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless', 'inventory_monitor'],
'display_default': "right_page",
'display_setting': {'ipam.vlan': "left_page", 'dcim.device': "full_width_page", 'dcim.devicerole': "full_width_page", 'inventory_monitor.probe': "additional_tab"}
}
}
Enable Attachments for custom plugin (models)
- Append your plugin to configuration list
apps
: ['<plugin_name>']
- Extend detail templates
-
# At the TOP {% load plugins %} # Under a comments section {% plugin_right_page object %} # add the left_page and full_width for future extension
- Example (device - core model):
-
Screenshots
- Model View
- List View
- Detail View
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netbox-attachments-1.1.2.tar.gz
(12.3 kB
view details)
Built Distribution
File details
Details for the file netbox-attachments-1.1.2.tar.gz
.
File metadata
- Download URL: netbox-attachments-1.1.2.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cace46e69fcf772c27682f3f6aa7745cba942109ba8499ea1052b4506ae66fe4 |
|
MD5 | 464f0200e4bd24709ceacdb2e30411dc |
|
BLAKE2b-256 | 9a5597602fc13d3cf02baf9223859eefc3502843254f2d5c2358051615f24212 |
File details
Details for the file netbox_attachments-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: netbox_attachments-1.1.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e2e3e23c66862f6bb02d666a7a11869b1ba62f551b9388ce0556058845876b5 |
|
MD5 | 87066dd909d82f33ce423f388ee55d97 |
|
BLAKE2b-256 | 54a76a401edecdf42408aa944e7097e79645a200cd709c1c31955c3828150a78 |