
    pi]                        S SK Jr  S SKJr  S SKJr  S SK7  S SKrS SK7  S SK	7  S SK
7  S SK7   " S S\R                  5      r " S S	\R                  5      r " S
 S\R                  5      r " S S\R"                  5      r " S S\R&                  5      r " S S\R*                  5      r " S S\R                  5      r " S S\R"                  5      rg)    )render)generics)JsonResponse)*Nc                       \ rS rSr/ rS rSrg)SendNotificationMobile   c                     UR                   nSU;   a9  US   nUS   nUS   nUS   nUS:X  a  [        XVU5        OUS:X  a  [        XVU5        [        S0 0SS	9$ )
NdeviceTokentitlebodydeviceOSTypeandroidiosdataF)safe)r   send_push_notification_androidsend_push_notification_iosr   )	selfrequestargskwargsr   r   r   r   r   s	            ڀ/Users/waleedhassanin/Documents/snowflake_co_dev_github/snow_flake_back_end_deploy/mama_care_api/mama_care_notification/views.pypostSendNotificationMobile.post   sn    ||D }-KME<D/Ly(.{4H&*;tDVBKu55     N)__name__
__module____qualname____firstlineno__querysetr   __static_attributes__r   r   r   r   r      s    H6r   r   c                       \ rS rSr\\/r\/rSS/r	\
r\R                  R                  5       R                  S5      r\rSrg)UserDeviceListMobileView   parentProfileIddeviceOSTypeIdz-idr   N)r   r   r    r!   APIKeyAuthenticationMobileTokenAuthenticationauthentication_classesDjangoFilterBackendfilter_backendsfilterset_fieldsStandardSetPaginationpagination_class
UserDeviceobjectsallorder_byr"   UserDeviceSerializerserializer_classr#   r   r   r   r%   r%      sM    24MN*+O)*:;,!!%%'007H+r   r%   c                   ^    \ rS rSr\\/r\/r\	r
\R                  R                  5       r\rSrg)UserDeviceListDashboardView(   r   N)r   r   r    r!   r)   DashboardTokenAuthenticationr+   r,   r-   r/   r0   r1   r2   r3   r"   r5   r6   r#   r   r   r   r8   r8   (   s6    24PQ*+O,!!%%'H+r   r8   c                   ^    \ rS rSr\\/r\/rSr	\
R                  R                  5       r\rSrg)UserDeviceDetailDashboardView/   idr   N)r   r   r    r!   r)   r:   r+   r,   r-   lookup_fieldr1   r2   r3   r"   r5   r6   r#   r   r   r   r<   r<   /   s5    24PQ*+OL!!%%'H+r   r<   c                   d    \ rS rSr\\/r\/rS/r	\
r\R                  R                  5       r\rSrg)NotificationListMobileView8   userDeviceIdr   N)r   r   r    r!   r)   r*   r+   r,   r-   r.   r/   r0   Notificationr2   r3   r"   NotificationSerializerr6   r#   r   r   r   rA   rA   8   s?    24MN*+O&',##'')H-r   rA   c                   ^    \ rS rSr\\/r\/rSr	\
R                  R                  5       r\rSrg)NotificationDetailMobileViewA   r>   r   N)r   r   r    r!   r)   r*   r+   r,   r-   r?   rD   r2   r3   r"   rE   r6   r#   r   r   r   rG   rG   A   s5    24MN*+OL##'')H-r   rG   c                   ^    \ rS rSr\\/r\/r\	r
\R                  R                  5       r\rSrg)NotificationListDashboardViewI   r   N)r   r   r    r!   r)   r:   r+   r,   r-   r/   r0   rD   r2   r3   r"   rE   r6   r#   r   r   r   rJ   rJ   I   s6    24PQ*+O,##'')H-r   rJ   c                   ^    \ rS rSr\\/r\/rSr	\
R                  R                  5       r\rSrg)NotificationDetailDashboardViewP   r>   r   N)r   r   r    r!   r)   r:   r+   r,   r-   r?   rD   r2   r3   r"   rE   r6   r#   r   r   r   rM   rM   P   s5    24PQ*+OL##'')H-r   rM   )django.shortcutsr   rest_frameworkr   django.httpr   mama_care_notification.apnsjsonmama_care_notification.fcmmama_care.viewsmama_care_notification.models"mama_care_notification.serializersGenericAPIViewr   ListCreateAPIViewr%   r8   RetrieveUpdateDestroyAPIViewr<   ListAPIViewrA   UpdateAPIViewrG   rJ   rM   r   r   r   <module>r]      s    # # $ )  (  + 06X44 6$,x99 ,,("<"< ,,H$I$I ,.!5!5 ..8#9#9 ..H$>$> ..h&K&K .r   