
    Οh                         S SK r S SKJr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr   " S	 S
\5      rS rS rS rS rg)    Nrender)datetime)HttpResponse)redirect)LogMessageForm)
LogMessage)ListViewc                   0   ^  \ rS rSrSr\rU 4S jrSrU =r	$ )HomeListView   z3Renders the home page, with a list of all messages.c                 0   > [         [        U ]
  " S0 UD6nU$ )N )superr   get_context_data)selfkwargscontext	__class__s      :C:\Users\phili\Documents\DEV\django\projets\hello\views.pyr   HomeListView.get_context_data   s    d<FvF    r   )
__name__
__module____qualname____firstlineno____doc__r	   modelr   __static_attributes____classcell__)r   s   @r   r   r      s    =E r   r   c                     [        U S5      $ )Nzhello/about.htmlr   requests    r   aboutr$      s    '-..r   c                     [        U S5      $ )Nzhello/contact.htmlr   r"   s    r   contactr&      s    '/00r   c                 z    [        U R                  5       5        [        U SU[        R                  " 5       S.5      $ )Nzhello/hello_there.html)namedate)printbuild_absolute_urir   r   now)r#   r(   s     r   hello_therer-      s7    	'
$
$
&' LLN	
 r   c                 0   [        U R                  =(       d    S 5      nU R                  S:X  aZ  UR                  5       (       aD  UR	                  SS9n[
        R                  " 5       Ul        UR	                  5         [        S5      $ g [        U SSU05      $ )NPOSTF)commithomezhello/log_message.htmlform)
r   r/   methodis_validsaver   r,   log_dater   r   )r#   r2   messages      r   log_messager8   &   sy    ',,.$/D~~==??iiui-G'||~GLLNF##	  g7&$HHr   )redjango.shortcutsr   django.utils.timezoner   django.httpr   r   hello.formsr   hello.modelsr	   django.views.genericr
   r   r$   r&   r-   r8   r   r   r   <module>r@      s>    	 # * $ % & # )
8 /1	
Ir   