
    f                         d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	m
Z
mZ  ed      d        Z ed      d	        Zy
)z
SYNCRO VIEWS
Frontend

    )login_required)HttpResponseHttpResponseRedirect)loader)serieshelperspeakerhelpersearchhelpersz/accounts/login/)	login_urlc                     t        j                  d      }t        |j                  t	        j
                         t        j                         d|             S )Nzsyncro_frontend/home.html)series_countspeakers_count)r   get_templater   renderr   get_series_countr   get_speaker_count)requesttemplates     4/var/www/lazysolutions_prod/syncro/views/frontend.pyhomer      sM    ""#>?H$557'99;)       c                    | j                   dk(  r| j                  j                  d      }t        dt	        |      z         t        j                  || j                        }|du rt        d       t        d      S t        j                  d      }t        |j                  ||             S t        dt	        | j                         z         t        d      S )	NGETsearch_valuez[SEARCH][MAIN] searching for %sFz[SEARCH][MAIN] search failed!z/syncroz"syncro_frontend/search_result.htmlz[SEARCH][MAIN] wrong method %s)methodr   getprintstrr	   search_mainuserr   r   r   r   r   )r   
search_valcontextr   s       r   r   r      s    ~~[[__^4
/#j/AB  ++JEe12'	22 &&'KLHOOGW=>>.W^^1DDE#I..r   N)__doc__django.contrib.auth.decoratorsr   django.httpr   r   django.templater   syncro.helpersr   r   r	   r   r    r   r   <module>r(      sO    : : " E E ,- . ,-/ ./r   