title: How i can reformat this code to follow DRY principle
body: <p>my views.py</p>
  <pre><code>    from rest_framework import generics
  from rest_framework.pagination import LimitOffsetPagination
  from rest_framework.filters import SearchFilter, OrderingFilter
  from django_filters.rest_framework import DjangoFilterBackend
  from rest_framework.permissions import IsAdminUser
  
  from .serializers import *
  from .permissions import IsAdminOrReadOnly
  from .filters import *
  
  
  class ProductsAPIList(generics.ListCreateAPIView):
      queryset = Products.objects.all()
      serializer_class = ProductsSerializer
      pagination_class = LimitOffsetPagination
      permission_classes = (IsAdminOrReadOnly,)
      filter_backends = (DjangoFilterBackend, SearchFilter, OrderingFilter)
      search_fields = ('title', 'category__name')
      filter_fields = ('category',)
      ordering_fields = ('price',)
      filterset_class = ProductsFilter
  
  
  class ProductsAPIUpdate(generics.RetrieveUpdateAPIView):
      queryset = Products.objects.all()
      serializer_class = ProductsSerializer
      permission_classes = (IsAdminOrReadOnly, )
  
  
  class ProductsAPIRemove(generics.RetrieveDestroyAPIView):
      queryset = Products.objects.all()
      serializer_class = ProductsSerializer
      permission_classes = (IsAdminOrReadOnly, )
  
  
  class StorageAPIList(generics.ListCreateAPIView):
      queryset = ProductsStorage.objects.all()
      serializer_class = ProductsStorageSerializer
      permission_classes = (IsAdminUser,)
  
  
  class StorageAPIUpdate(generics.RetrieveUpdateAPIView):
      queryset = ProductsStorage.objects.all()
      serializer_class = ProductsStorageSerializer
      permission_classes = (IsAdminUser,)
  
  
  class StorageAPIRemove(generics.RetrieveDestroyAPIView):
      queryset = ProductsStorage.objects.all()
      serializer_class = ProductsStorageSerializer
      permission_classes = (IsAdminUser,)
  
  
  class ProductSignAPIList(generics.ListCreateAPIView):
      queryset = ProductSign.objects.all()
      serializer_class = ProductSignSerializer
      permission_classes = (IsAdminUser,)
  
  
  class ProductSignAPIUpdate(generics.RetrieveUpdateAPIView):
      queryset = ProductSign
      serializer_class = ProductSignSerializer
      permission_classes = (IsAdminUser,)
  
  
  class ProductSignAPIRemove(generics.RetrieveDestroyAPIView):
      queryset = ProductsStorage.objects.all()
      serializer_class = ProductSignSerializer
      permission_classes = (IsAdminUser,)
  </code></pre>
  <p>my urls.py</p>
  <pre><code>    from django.conf.urls.static import static
  from django.contrib import admin
  from django.urls import path, include
  
  from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView
  
  from InternetShop import settings
  from InternetShopApp.views import *
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('api/v1/products/', ProductsAPIList.as_view()),
      path('api/v1/products/&lt;int:pk&gt;/', ProductsAPIUpdate.as_view()),
      path('api/v1/productsremove/&lt;int:pk&gt;/', ProductsAPIRemove.as_view()),
      path('api/v1/storage/', StorageAPIList.as_view()),
      path('api/v1/storage/&lt;int:pk&gt;/', StorageAPIList.as_view()),
      path('api/v1/storageremove/&lt;int:pk&gt;/', StorageAPIList.as_view()),
      path('api/v1/productsign/', ProductSignAPIList.as_view()),
      path('api/v1/productsign/&lt;int:pk&gt;/', ProductSignAPIUpdate.as_view()),
      path('api/v1/productsignremove/&lt;int:pk&gt;/', ProductSignAPIRemove.as_view()),
      path('api/v1/login/', include('djoser.urls')),
      path('api/v1/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
      path('api/v1/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
      path('api/v1/token/verify/', TokenVerifyView.as_view(), name='token_verify'),
  ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  <p>In my views i repeat a lot of identic stuff for different models(products, storage, productsign) therefore i disturb DRY principle , and i need to cut back some code. Maybe i can somehow habitate from previous classes or use something else.
  In my views i repeat a lot of identic stuff for different models(products, storage, productsign) therefore i disturb DRY principle , and i need to cut back some code. Maybe i can somehow habitate from previous classes or use something else.</p>