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 |
| >= 3.5.0 | 2.0.0 |
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
Attachmentsfeature on all models definded under the app label. Attachmets are displayed onright_pageof 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_labelandmodelnames could be found at API<your_netbox_url>/api/extras/content-types/
Warning
additional_tabdoes not work for Plugin models
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbox-attachments-2.0.4.tar.gz.
File metadata
- Download URL: netbox-attachments-2.0.4.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c9fa775c513b58d764a42a0e6693067f29dd3d3b0916c5aa810b52f87b5be7b
|
|
| MD5 |
921ac5108a60f3d72f74de4a6f069942
|
|
| BLAKE2b-256 |
59e9858f8205b9c952fa8a8b56c922dd875e957b30680bcb55d40508b9ce6a03
|
File details
Details for the file netbox_attachments-2.0.4-py3-none-any.whl.
File metadata
- Download URL: netbox_attachments-2.0.4-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d648be8ca7092d6d6dbdb435aedb29e6caecca37da98430282ba5345f7ba205
|
|
| MD5 |
bf0d7fdac5278b2a149b0f919918ecb0
|
|
| BLAKE2b-256 |
a5286a32e22e9513905a8bfb37d0e8365d02c2caa184054e8969720565f7928f
|