B
    b7                 @   s   d dl mZ d dlmZ d dlmZmZ d dlmZm	Z	 d dl
mZ d dlmZ d dlmZmZ G dd	 d	eZG d
d deZeeG dd dejZdS )    )admin)TrainingCategory)	ModelFormModelChoiceField)actionsdb_const)forms)gettext_lazy)TRAINING_UNITSBOOLEANSc               @   s   e Zd ZG dd dZdS )TrainingCategoryCreationFormc               @   s   e Zd ZeZdZdS )z!TrainingCategoryCreationForm.Meta)category_nameminimum_unitunit	round_offreport_symbolN)__name__
__module____qualname__r   modelfields r   r   @G:\easytimepro\master/mysite/att\admin\trainingcategory_admin.pyMeta   s   r   N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZG dd dZdS )TrainingCategoryChangeFormc               @   s   e Zd ZeZdZdS )zTrainingCategoryChangeForm.Meta)r   r   r   r   r   N)r   r   r   r   r   r   r   r   r   r   r      s   r   N)r   r   r   r   r   r   r   r   r      s   r   c                   s,   e Zd ZdZdZeZeZ fddZ	  Z
S )TrainingCategoryAdmin)idr   r   r   r   r   )r   r   c                s    t t| |j|jjd}|S )N)Z
company_id)superr   get_querysetfilteruserZcurrent_company)selfZrequestZ	query_set)	__class__r   r   r   "   s    z"TrainingCategoryAdmin.get_queryset)r   r   r   Zlist_displayZlist_filterr   Zadd_formr   Zformr   __classcell__r   r   )r"   r   r      s
   r   N)mysiter   Zmysite.att.modelsr   Zdjango.formsr   r   Z
mysite.attr   r   Zmysite.adminr   Zdjango.utils.translationr	   _Zmysite.att.models_choicesr
   r   r   r   registerZZKModelAdminr   r   r   r   r   <module>   s   