
    wg                         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 d dlmZ  G d	 d
ee          ZdS )    )JsonResponse)get_site_service)FormatDocumentget_format_document)GetSettingsget_get_settings_interactor)SiteServiceInterface)RequestInterface)SettingsMixin)BaseTemplateLoadViewc            	       n    e Zd ZU  e            Zeed<    e             e            dde	de
dedefdZdS )	GetPopupsite_service)get_settings_interactordocument_formatterrequestr   r   returnc                L   |j                             d          } ||          }|dk    rd}nd} ||j        |j                  }	| j                            |                                          }
||	|
d}t          d| j        	                    d||	          i          S )
Ndocumentaboutcompanyzdocument-popup-with-headerzdocument-popup)domain	subdomain)r   settingssitecontent	materials)app_nametemplate_namecontext)
GETgetr   r   r   get_site_from_urlbuild_absolute_urir   template_loaderload_template)selfr   r   r   argskwargsdocument_slugr   r   r   r   r   s               (/var/www/html/cms/web/materials/views.pyr!   zGetPopup.get   s      
33%%m44N**8MM,M**>'
 
 

  2273M3M3O3OPP'XtLL4/==(w >  
 
 	
    N)__name__
__module____qualname__r   r   r	   __annotations__r   r   r
   r   r   r   r!    r+   r*   r   r      s         )9)9););L&;;; 0K/J/L/L-@-@-B-B 
  
  
! 
 "-	 

 + 
 
 
  
  
  
  
  
r+   r   N)django.httpr   !application.services.site_servicer   /application.usecases.formatters.format_documentr   r   (application.usecases.public.get_settingsr   r   domain.user.sites.site_servicer	   )infrastructure.requests.request_interfacer
   !web.settings.views.settings_mixinr   web.template.views.viewsr   r   r0   r+   r*   <module>r9      s    $ $ $ $ $ $ > > > > > >               @ ? ? ? ? ? F F F F F F ; ; ; ; ; ; 9 9 9 9 9 9#
 #
 #
 #
 #
#] #
 #
 #
 #
 #
r+   