from django.core.paginator import Paginator
from django.http import JsonResponse
from django.views.decorators.http import require_http_methods

from backend.Service.SourceDataService import SourceDataService
from backend.models import SourceCategory


@require_http_methods(['POST'])
def Create(reqeust):
    return SourceDataService.Create(reqeust)


@require_http_methods(['POST'])
def Update(reqeust):
    return SourceDataService.Update(reqeust)


@require_http_methods(['POST'])
def Delete(reqeust):
    return SourceDataService.Delete(reqeust)


@require_http_methods(['POST'])
def Info(reqeust):
    return SourceDataService.Info(reqeust)


@require_http_methods(['POST'])
def Search(reqeust):
    return SourceDataService.Search(reqeust)


@require_http_methods(['POST'])
def find(reqeust):
    return SourceDataService.findData(reqeust)

@require_http_methods(['POST'])
def Categories(request):
    return SourceDataService.Categories(request)

@require_http_methods(['POST'])
def Catcreat(request):
    return SourceDataService.Catcreat(request)

@require_http_methods(['POST'])
def info(request):
    return SourceDataService.info(request)

@require_http_methods(['POST'])
def updatetype(request):
    return SourceDataService.updatetype(request)