
    4h}                         S SK 7  S rg)   )*c                    U R                   R                  (       d  / SSS.$ U R                   n[        R                  R	                  5       n[
        R                  R	                  5       nUR                  S:X  a=  [        R                  R                  SS/S9n[
        R                  R                  US9nO:[        R                  R                  US9n[
        R                  R                  US9n[        U5      [        U5      -   n[        US	 S
S9nUR                  SS9R                  5       nUR                  SS9R                  5       nUXg-   US.$ )N    )combined_notificationsnotification_countunread_messages_countadmin
user_eventsystem_alert)category__in)receiver)recipient_userc                     U R                   $ )N)
created_at)xs    DD:\Anime\Ugyen\janka_web_project\janka_web_app\context_processors.py<lambda>'notifications_context.<locals>.<lambda>   s    Q\\    T)keyreverseF)	is_viewed)read)useris_authenticatedNotificationobjectsnoneMessage	user_rolefilterlistsortedcount)requestr   notificationsmessagescombinedsorted_combinednotification_unreadmessage_unreads           r   notifications_contextr,      sA   <<((&("#%&
 	
 <<D ((--/M##%H~~ $,,33&7 4 
 ??))4)8 %,,3343H??))4)8 M"T(^3HX+A4PO (...?EEG__%_0668N #21B!/ r   N)modelsr,    r   r   <module>r/      s    #r   