mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-18 11:22:25 -06:00
Closes #1691: Cleaned up and reorganized import statements
This commit is contained in:
@@ -2,7 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
from dcim.constants import STATUS_ACTIVE, STATUS_OFFLINE, STATUS_STAGED
|
||||
|
||||
|
||||
# VirtualMachine statuses (replicated from Device statuses)
|
||||
STATUS_CHOICES = [
|
||||
[STATUS_ACTIVE, 'Active'],
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django_filters
|
||||
from django.db.models import Q
|
||||
from netaddr import EUI
|
||||
from netaddr.core import AddrFormatError
|
||||
|
||||
from django.db.models import Q
|
||||
|
||||
from dcim.models import DeviceRole, Interface, Platform, Site
|
||||
from extras.filters import CustomFieldFilterSet
|
||||
from tenancy.models import Tenant
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from mptt.forms import TreeNodeChoiceField
|
||||
|
||||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db.models import Count
|
||||
from mptt.forms import TreeNodeChoiceField
|
||||
|
||||
from dcim.constants import IFACE_FF_VIRTUAL
|
||||
from dcim.formfields import MACAddressFormField
|
||||
@@ -20,7 +19,6 @@ from utilities.forms import (
|
||||
from .constants import STATUS_CHOICES
|
||||
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine
|
||||
|
||||
|
||||
VIFACE_FF_CHOICES = (
|
||||
(IFACE_FF_VIRTUAL, 'Virtual'),
|
||||
)
|
||||
|
||||
@@ -7,7 +7,6 @@ from dcim.models import Interface
|
||||
from utilities.tables import BaseTable, ToggleColumn
|
||||
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine
|
||||
|
||||
|
||||
CLUSTERTYPE_ACTIONS = """
|
||||
{% if perms.virtualization.change_clustertype %}
|
||||
<a href="{% url 'virtualization:clustertype_edit' slug=record.slug %}" class="btn btn-xs btn-warning"><i class="glyphicon glyphicon-pencil" aria-hidden="true"></i></a>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.urls import reverse
|
||||
from rest_framework import status
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from users.models import Token
|
||||
from utilities.tests import HttpStatusMixin
|
||||
|
||||
@@ -5,7 +5,6 @@ from django.conf.urls import url
|
||||
from ipam.views import ServiceCreateView
|
||||
from . import views
|
||||
|
||||
|
||||
app_name = 'virtualization'
|
||||
urlpatterns = [
|
||||
|
||||
|
||||
@@ -14,10 +14,8 @@ from utilities.views import (
|
||||
BulkComponentCreateView, BulkDeleteView, BulkEditView, BulkImportView, ComponentCreateView, ComponentDeleteView,
|
||||
ComponentEditView, ObjectDeleteView, ObjectEditView, ObjectListView,
|
||||
)
|
||||
from . import filters, forms, tables
|
||||
from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine
|
||||
from . import filters
|
||||
from . import forms
|
||||
from . import tables
|
||||
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user