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.5 |
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: "right_page"
- Options: "left_page", "right_page", "full_width_page"
- 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': 'right_page'}
- 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': "right_page"}
}
}
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.0.5.tar.gz
(11.0 kB
view details)
Built Distribution
File details
Details for the file netbox-attachments-1.0.5.tar.gz
.
File metadata
- Download URL: netbox-attachments-1.0.5.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566946b6e41ebc68b7b58240f3846dd56687fdfab53d57b891873200d5da3530 |
|
MD5 | 93b14a1d80a9e9f8827360feeb6734b2 |
|
BLAKE2b-256 | 5847468a81a548ec68d36718feca9cf6fe651ff0e4780be84ff152528aebfbd1 |
File details
Details for the file netbox_attachments-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: netbox_attachments-1.0.5-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a8cfd2e56fd694baa1e817e9a57222994f7c50c38122a5b4859c39dd11178e5 |
|
MD5 | e29da914296f2874aa5011b26a2978d5 |
|
BLAKE2b-256 | 50e0644ee4d7b62e4b76c6c2b0a6a539f10d7955afb1c5b4eeec8c87e194b181 |