U
    gyÇcW  ã                   @   sˆ   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
 d dlmZ d dlmZ d dlmZ d d	lZd
d„ ZG dd„ deƒZd	S )é    ©Úrender)Úviewsets)ÚResponse)ÚAPIView)ÚHTTP_200_OKÚHTTP_401_UNAUTHORIZED)Úpermissions)ÚJsonResponse)Úcsrf_exemptNc                 C   s
   t | dƒS )NzCategoryMng.htmlr   )Úrequest© r   ú:C:\Users\offic\Desktop\PIM\XCMS_PIM\XCMS_PIM\views\Test.pyÚCategoryMng   s    r   c                   @   s   e Zd Zedœdd„ZdS )ÚRegistCategory)Úreturnc                 C   s6   |j jsttd�S d}t |j¡}d|i}tdtd�S )N)ÚstatusZfailureÚresultÚOK)ÚuserÚis_authenticatedr   r   ÚjsonÚloadsÚbodyr   )Úselfr   ZlResultZdatasZResponseDatar   r   r   Úpost   s    
 ÿzRegistCategory.postN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   r   )Údjango.shortcutsr   Úrest_frameworkr   Úrest_framework.responser   Úrest_framework.viewsr   Zrest_framework.statusr   r   r	   Údjango.http.responser
   Údjango.views.decorators.csrfr   r   r   r   r   r   r   r   Ú<module>   s   