o
    &+wh                      @   s$   d dl mZmZ dd Zdd ZdS )   )ThemeShopc              
   C   s   d}zt j }|st jjddd}W n ty2 } ztd|  t ddd}W Y d}~nd}~ww ||r9|jnd|r?|jnd|rH| dS ddS )z"Add theme context to all templatesNlightz#28a745)modeprimary_colorzError in theme_context: z#218838)theme
theme_moder   secondary_color)	r   objectsfirstcreate	Exceptionprintr   r   get_secondary_color)requestr   e r   7/var/www/html/hyperkenya/settings/context_processors.pytheme_context   s$   

r   c              
   C   s   d}zt j }|st jjddddd}W d|iS W d|iS  tyA } ztd|  t ddddd}W Y d}~d|iS d}~ww )	z!Add shop details to all templatesNzPOS 254zNairobi, Kenyaz+254700000000zinfo@pos254.com)nameaddressphoneemailzError in shop_details context: shop)r   r
   r   r   r   r   )r   r   r   r   r   r   shop_details   s6   
r   N)modelsr   r   r   r   r   r   r   r   <module>   s   