fix: imports sorted
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
from django.urls import path, include
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from rest_framework.routers import DefaultRouter # type: ignore
|
||||
from . import views
|
||||
|
||||
|
||||
router = DefaultRouter()
|
||||
|
||||
router.register(r"company-accounts", views.CompanyAccountView, "company-account")
|
||||
router.register(r"company-folders", views.CompanyFolderView, "company-folders")
|
||||
router.register(r"companies", views.CompanyView, "companies")
|
||||
router.register(r"companies", views.CompanyFolderViewSet, "companies-folders")
|
||||
router.register(r"companies", views.CompanyAccountViewSet, "companies-accounts")
|
||||
router.register(r"companies", views.CompanyContractViewSet, "companies-contracts")
|
||||
router.register(r"company-accounts", views.CompanyAccountView, "company-account") # type: ignore
|
||||
router.register(r"company-folders", views.CompanyFolderView, "company-folders") # type: ignore
|
||||
router.register(r"companies", views.CompanyView, "companies") # type: ignore
|
||||
router.register(r"companies", views.CompanyFolderViewSet, "companies-folders") # type: ignore
|
||||
router.register(r"companies", views.CompanyAccountViewSet, "companies-accounts") # type: ignore
|
||||
router.register(r"companies", views.CompanyContractViewSet, "companies-contracts") # type: ignore
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("", include(router.urls)),
|
||||
path("", include(router.urls)), # type: ignore
|
||||
]
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
import uuid
|
||||
|
||||
from django_core.mixins import BaseViewSetMixin # type: ignore
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from drf_spectacular.utils import extend_schema
|
||||
|
||||
from rest_framework.decorators import action # type: ignore
|
||||
from rest_framework.permissions import AllowAny, IsAdminUser # type: ignore
|
||||
from rest_framework.viewsets import ( # type: ignore
|
||||
ModelViewSet,
|
||||
GenericViewSet
|
||||
)
|
||||
from rest_framework.viewsets import ModelViewSet, GenericViewSet # type: ignore
|
||||
from rest_framework.request import HttpRequest # type: ignore
|
||||
from rest_framework.response import Response # type: ignore
|
||||
from rest_framework import status # type: ignore
|
||||
from rest_framework.generics import get_object_or_404 # type: ignore
|
||||
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from core.apps.companies.permissions import IsCompanyAccount
|
||||
|
||||
from core.apps.companies.models import (
|
||||
CompanyModel,
|
||||
CompanyFolderModel,
|
||||
CompanyAccountModel
|
||||
CompanyAccountModel,
|
||||
)
|
||||
from core.apps.companies.serializers import (
|
||||
CreateCompanySerializer,
|
||||
@@ -29,12 +25,11 @@ from core.apps.companies.serializers import (
|
||||
UpdateCompanySerializer,
|
||||
DestroyCompanySerializer,
|
||||
|
||||
RetrieveCompanyFolderSerializer,
|
||||
RetrieveCompanyAccountSerializer,
|
||||
CreateCompanyFolderSerializer,
|
||||
BaseCompanyAccountSerializer,
|
||||
|
||||
CreateFolderForCompanySerializer
|
||||
RetrieveCompanyFolderSerializer,
|
||||
CreateFolderForCompanySerializer,
|
||||
)
|
||||
|
||||
from core.apps.contracts.serializers import (
|
||||
@@ -42,9 +37,7 @@ from core.apps.contracts.serializers import (
|
||||
BaseContractSerializer
|
||||
)
|
||||
|
||||
from core.apps.contracts.models import (
|
||||
ContractModel,
|
||||
)
|
||||
from core.apps.contracts.models import ContractModel
|
||||
|
||||
|
||||
UserModel = get_user_model()
|
||||
|
||||
Reference in New Issue
Block a user