
    vg                         d Z ddl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 Zd Z ej                   ed	ed	
             y)zJ
context_processor.py

This module is used to register context processor`
    )JsonResponse)includepath)urlpatternsHistoryForm)AuditTagc                     t               }d|iS )zC
    This method will return the history additional field form
    history_formr   )requestforms     4/var/www/horilla/horilla_audit/context_processors.pyr   r      s     =DD!!    c                     | j                   d   }t        j                  j                  |      }t	        d|d   j
                  i      S )z@
    This method is used to dynamically create history tags
    title)r   idr   )POSTr	   objectsget_or_creater   r   )r   r   s     r   dynamic_tagr      sC    
 LL!E***7EuQx{{+,,r   zhorilla-audit-log)nameN)__doc__django.httpr   django.urlsr   r   horilla.urlsr   horilla_audit.formsr   horilla_audit.modelsr	   r   r   append r   r   <module>r       sB    % % $ + )"-   4+[?RS Tr   