File tree Expand file tree Collapse file tree 5 files changed +12
-1
lines changed
Expand file tree Collapse file tree 5 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 55### Enhancements
66
77* [ #6423 ] ( https://github.com/netbox-community/netbox/issues/6423 ) - Cache rendered REST API specifications
8+ * [ #6708 ] ( https://github.com/netbox-community/netbox/issues/6708 ) - Add image attachment support for circuits, power panels
89* [ #7387 ] ( https://github.com/netbox-community/netbox/issues/7387 ) - Enable arbitrary ordering of custom scripts
910
1011### Bug Fixes
Original file line number Diff line number Diff line change 1+ from django .contrib .contenttypes .fields import GenericRelation
12from django .core .exceptions import ValidationError
23from django .db import models
34from django .urls import reverse
@@ -202,6 +203,9 @@ class Circuit(PrimaryModel):
202203 comments = models .TextField (
203204 blank = True
204205 )
206+ images = GenericRelation (
207+ to = 'extras.ImageAttachment'
208+ )
205209
206210 # Cache associated CircuitTerminations
207211 termination_a = models .ForeignKey (
Original file line number Diff line number Diff line change 1+ from django .contrib .contenttypes .fields import GenericRelation
12from django .core .exceptions import ValidationError
23from django .core .validators import MaxValueValidator , MinValueValidator
34from django .db import models
@@ -39,6 +40,9 @@ class PowerPanel(PrimaryModel):
3940 name = models .CharField (
4041 max_length = 100
4142 )
43+ images = GenericRelation (
44+ to = 'extras.ImageAttachment'
45+ )
4246
4347 objects = RestrictedQuerySet .as_manager ()
4448
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ <h5 class="card-header">
7272 < div class ="col col-md-6 ">
7373 {% include 'circuits/inc/circuit_termination.html' with termination=object.termination_a side='A' %}
7474 {% include 'circuits/inc/circuit_termination.html' with termination=object.termination_z side='Z' %}
75+ {% include 'inc/image_attachments_panel.html' %}
7576 {% plugin_right_page object %}
7677 </ div >
7778</ div >
Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ <h5 class="card-header">
3939 </ table >
4040 </ div >
4141 </ div >
42+ {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:powerpanel_list' %}
4243 {% plugin_left_page object %}
4344 </ div >
4445 < div class ="col col-md-6 ">
4546 {% include 'inc/custom_fields_panel.html' %}
46- {% include 'extras/ inc/tags_panel .html' with tags=object.tags.all url='dcim:powerpanel_list ' %}
47+ {% include 'inc/image_attachments_panel .html' %}
4748 {% plugin_right_page object %}
4849 </ div >
4950</ div >
You can’t perform that action at this time.
0 commit comments