
    /ۨh                     d    d dl mZ d dlmZ d dlmZ d dlZd dlZddlm	Z	 ed        Z
ed        Zy)	    )login_requiredrender)JsonResponseN   )calcular_estadisticas_unidadesc                     t        | d      S )Nztesting.htmlr   )requests    BC:\xampp\htdocs\Repo\fox2\Fox\app\controllers\testingController.py
gettestingr   	   s    '>**    c                    	 t        | j                  j                  d            }t        | j                  j                  d            }t        | j                  j                  d            }t        | j                  j                  d            }t        ||||	      }t        d
|       t        |d      S # t        t        f$ r t        ddid      cY S w xY w)Ncam_from_daycam_from_year
cam_to_daycam_to_yearerroru   Parámetros inválidosi  )status)ano_from	camp_fromano_tocamp_todataF)safe)intGETget	TypeError
ValueErrorr   r   print)r
   cam_from	year_fromcam_toyear_tor   s         r   gettestingdatar%      s    Mw{{~6789	W[[__\23gkkoom45
 *	D 
&5)) z" MW&>?LLMs   BB: :CC)django.contrib.auth.decoratorsr   django.shortcutsr   django.httpr   jsontimeservices.testingServicer   r   r%    r   r   <module>r-      s?    9 # $   F + + * *r   