Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
cruse1977 committed Oct 9, 2024
1 parent 89125da commit 53e8fee
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 140
extend-ignore = E126, E722
2 changes: 1 addition & 1 deletion netbox_floorplan/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FloorplanImageForm(NetBoxModelForm):
FieldSet(('name', 'file', 'external_url', 'comments'), name='General'),
FieldSet(('comments', 'tags'), name='')
)

class Meta:
model = FloorplanImage
fields = [
Expand Down
36 changes: 12 additions & 24 deletions netbox_floorplan/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@
from netbox.views.generic import ObjectChangeLogView

urlpatterns = (
path('floorplans/', views.FloorplanListView.as_view(),
name='floorplan_list'),
path('floorplans/racks/', views.FloorplanRackListView.as_view(),
name='floorplan_rack_list'),
path('floorplans/devices/', views.FloorplanDeviceListView.as_view(),
name='floorplan_device_list'),
path('floorplans/', views.FloorplanListView.as_view(), name='floorplan_list'),
path('floorplans/racks/', views.FloorplanRackListView.as_view(), name='floorplan_rack_list'),
path('floorplans/devices/', views.FloorplanDeviceListView.as_view(), name='floorplan_device_list'),
path('floorplans/add/', views.FloorplanAddView.as_view(), name='floorplan_add'),
path('floorplans/<int:pk>/edit/',
views.FloorplanMapEditView.as_view(), name='floorplan_edit'),
path('floorplans/<int:pk>/delete/',
views.FloorplanDeleteView.as_view(), name='floorplan_delete'),
path('floorplans/<int:pk>/changelog/', ObjectChangeLogView.as_view(),
name='floorplan_changelog', kwargs={'model': models.Floorplan}),
path('floorplans/floorplanimages/',
views.FloorplanImageListView.as_view(), name='floorplanimage_list'),
path('floorplans/floorplanimages/add/',
views.FloorplanImageEditView.as_view(), name='floorplanimage_add'),
path('floorplans/floorplanimages/<int:pk>/edit/',
views.FloorplanImageEditView.as_view(), name='floorplanimage_edit'),
path('floorplans/floorplanimages/<int:pk>/delete/',
views.FloorplanImageDeleteView.as_view(), name='floorplanimage_delete'),
path('floorplans/floorplanimages/<int:pk>/',
views.FloorplanImageView.as_view(), name='floorplanimage'),
path('floorplans/floorplanimages/<int:pk>/changelog/', ObjectChangeLogView.as_view(),
name='floorplanimage_changelog', kwargs={'model': models.FloorplanImage}),
path('floorplans/<int:pk>/edit/', views.FloorplanMapEditView.as_view(), name='floorplan_edit'),
path('floorplans/<int:pk>/delete/', views.FloorplanDeleteView.as_view(), name='floorplan_delete'),
path('floorplans/<int:pk>/changelog/', ObjectChangeLogView.as_view(), name='floorplan_changelog', kwargs={'model': models.Floorplan}),
path('floorplans/floorplanimages/', views.FloorplanImageListView.as_view(), name='floorplanimage_list'),
path('floorplans/floorplanimages/add/', views.FloorplanImageEditView.as_view(), name='floorplanimage_add'),
path('floorplans/floorplanimages/<int:pk>/edit/', views.FloorplanImageEditView.as_view(), name='floorplanimage_edit'),
path('floorplans/floorplanimages/<int:pk>/delete/', views.FloorplanImageDeleteView.as_view(), name='floorplanimage_delete'),
path('floorplans/floorplanimages/<int:pk>/', views.FloorplanImageView.as_view(), name='floorplanimage'),
path('floorplans/floorplanimages/<int:pk>/changelog/', ObjectChangeLogView.as_view(), name='floorplanimage_changelog', kwargs={'model': models.FloorplanImage}),
)
2 changes: 0 additions & 2 deletions netbox_floorplan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ def file_upload(instance, filename):
path = 'netbox-floorplan/'

return f'{path}_{filename}'


0 comments on commit 53e8fee

Please sign in to comment.