B
    ADb                 @   sT   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
 G dd deZdS )	    )MenuList)	ZKService)settings)pathlistdir)randintc                   s$   e Zd Z fddZdd Z  ZS )DashboardServicec                s   t  | || _|| _d S )N)super__init__software_infourl_func)selfuserr   r   )	__class__ @G:\easytimepro\master/mysite/admin\services\dashboard_service.pyr
   	   s    zDashboardService.__init__c          	   C   s~   t | jd| j}| }| }dd tttj	dD }t
|}| d| jd |d|rn|td|d	  nd |d
d}|S )N c             S   s   g | ]}|qS r   r   ).0fr   r   r   
<listcomp>   s    z2DashboardService.page_settings.<locals>.<listcomp>zimg/banner/indexZsoftware_titleZstaffr      Z	worktable)Zdashboard_indextitleZ
menu_titleZredirect_moduleZ
banner_urlmenusZcurrent_app)r   r   r   Zget_modulesZ	get_menusr   r   joinr   Z
MEDIA_ROOTlenr   r   )r   Z	menu_listZmenu_modulesr   Zbanner_filesZlen_banner_filespage_settingsr   r   r   r      s    zDashboardService.page_settings)__name__
__module____qualname__r
   r   __classcell__r   r   )r   r   r      s   r   N)Zmysite.core.menur   Zmysite.base.services.zk_servicer   Zdjango.confr   osr   r   Zrandomr   r   r   r   r   r   <module>   s
   