o
    ­TïjÓ%  ã                   @   sþ  d dl mZm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mZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ dd	lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% dd
l&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZT ddlUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZgmhZhmiZimjZjmkZk ddllmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZm€Z€m�Z�m‚Z‚mƒZƒm„Z„m…Z…m†Z† ddl‡mˆZˆm‰Z‰mŠZŠm‹Z‹mŒZŒm�Z�mŽZŽm�Z�m�Z�m‘Z‘m’Z’m“Z“m”Z”m•Z• ddl–m—Z—m˜Z˜m™Z™mšZšm›Z›mœZœm�Z�mžZžmŸZŸm Z m¡Z¡m¢Z¢m£Z£m¤Z¤ ddl¥m¦Z¦m§Z§m¨Z¨m©Z© G dd„ dejªƒZ«dS )é    )ÚgenericsÚstatus)ÚResponse)ÚAPIKeyAuthenticationÚDashboardTokenAuthenticationé   )ÚimportArticle)ÚImportArticleRequestSerializer)ÚArticleOfTheDayMobileViewÚ ArticleOfTheDayListDashboardViewÚ"ArticleOfTheDayDetailDashboardView)ÚAppActionsListDashboardViewÚAppActionsDetailDashboardViewÚ-AppActionsRelatedAppFeaturesListDashboardViewÚ/AppActionsRelatedAppFeaturesDetailDashboardViewÚ(AppActionsActionButtonsListDashboardViewÚ*AppActionsActionButtonsDetailDashboardViewÚ0AppActionsActionButtonsLanguageListDashboardViewÚ2AppActionsActionButtonsLanguageDetailDashboardViewÚ)AppActionsRelatedContentListDashboardViewÚ+AppActionsRelatedContentDetailDashboardViewÚ1AppActionsRelatedContentLanguageListDashboardViewÚ3AppActionsRelatedContentLanguageDetailDashboardView)ÚChecklistListDashboardViewÚChecklistDetailDashboardViewÚ"ChecklistLanguageListDashboardViewÚ$ChecklistLanguageDetailDashboardViewÚChecklistItemsListDashboardViewÚ!ChecklistItemsDetailDashboardViewÚ'ChecklistItemsLanguageListDashboardViewÚ)ChecklistItemsLanguageDetailDashboardView)
Ú ContentInformationListMobileViewÚ"ContentInformationDetailMobileViewÚ#ContentInformationListDashboardViewÚ%ContentInformationDetailDashboardViewÚ+ContentInformationLanguageListDashboardViewÚ-ContentInformationLanguageDetailDashboardViewÚTargetAudienceListDashboardViewÚ!TargetAudienceDetailDashboardViewÚ!ContentObjectiveListDashboardViewÚ#ContentObjectiveDetailDashboardView)ÚContentSafetyListDashboardViewÚ ContentSafetyDetailDashboardViewÚ&ContentSafetyLanguageListDashboardViewÚ(ContentSafetyLanguageDetailDashboardViewÚ*ContentSafetyWarningSignsListDashboardViewÚ,ContentSafetyWarningSignsDetailDashboardViewÚ2ContentSafetyWarningSignsLanguageListDashboardViewÚ4ContentSafetyWarningSignsLanguageDetailDashboardViewÚ-ContentSafetyAdditionalNotesListDashboardViewÚ/ContentSafetyAdditionalNotesDetailDashboardViewÚ5ContentSafetyAdditionalNotesLanguageListDashboardViewÚ7ContentSafetyAdditionalNotesLanguageDetailDashboardView)Ú!EducationContentListDashboardViewÚ#EducationContentDetailDashboardViewÚ,EducationContentSocialMediaListDashboardViewÚ.EducationContentSocialMediaDetailDashboardViewÚ4EducationContentSocialMediaLanguageListDashboardViewÚ6EducationContentSocialMediaLanguageDetailDashboardViewÚ5EducationContentSocialMediaImageTextListDashboardViewÚ7EducationContentSocialMediaImageTextDetailDashboardViewÚ=EducationContentSocialMediaImageTextLanguageListDashboardViewÚ?EducationContentSocialMediaImageTextLanguageDetailDashboardViewÚ4EducationContentSocialMediaHashtagsListDashboardViewÚ6EducationContentSocialMediaHashtagsDetailDashboardViewÚ<EducationContentSocialMediaHashtagsLanguageListDashboardViewÚ>EducationContentSocialMediaHashtagsLanguageDetailDashboardViewÚ+EducationContentAppContentListDashboardViewÚ-EducationContentAppContentDetailDashboardViewÚ3EducationContentAppContentLanguageListDashboardViewÚ5EducationContentAppContentLanguageDetailDashboardViewÚ<EducationContentAppContentWhatYouShouldKnowListDashboardViewÚ>EducationContentAppContentWhatYouShouldKnowDetailDashboardViewÚDEducationContentAppContentWhatYouShouldKnowLanguageListDashboardViewÚFEducationContentAppContentWhatYouShouldKnowLanguageDetailDashboardView)Ú#InteractiveContentListDashboardViewÚ%InteractiveContentDetailDashboardViewÚ.InteractiveContentSocialMediaListDashboardViewÚ0InteractiveContentSocialMediaDetailDashboardViewÚ6InteractiveContentSocialMediaLanguageListDashboardViewÚ8InteractiveContentSocialMediaLanguageDetailDashboardViewÚ5InteractiveContentSocialMediaOptionsListDashboardViewÚ7InteractiveContentSocialMediaOptionsDetailDashboardViewÚ=InteractiveContentSocialMediaOptionsLanguageListDashboardViewÚ?InteractiveContentSocialMediaOptionsLanguageDetailDashboardViewÚ6InteractiveContentSocialMediaHashtagsListDashboardViewÚ8InteractiveContentSocialMediaHashtagsDetailDashboardViewÚ>InteractiveContentSocialMediaHashtagsLanguageListDashboardViewÚ@InteractiveContentSocialMediaHashtagsLanguageDetailDashboardViewÚ-InteractiveContentAppContentListDashboardViewÚ/InteractiveContentAppContentDetailDashboardViewÚ5InteractiveContentAppContentLanguageListDashboardViewÚ7InteractiveContentAppContentLanguageDetailDashboardViewÚ4InteractiveContentAppContentOptionsListDashboardViewÚ6InteractiveContentAppContentOptionsDetailDashboardViewÚ<InteractiveContentAppContentOptionsLanguageListDashboardViewÚ>InteractiveContentAppContentOptionsLanguageDetailDashboardView)Ú'ProblemSolutionContentListDashboardViewÚ)ProblemSolutionContentDetailDashboardViewÚ2ProblemSolutionContentSocialMediaListDashboardViewÚ4ProblemSolutionContentSocialMediaDetailDashboardViewÚ:ProblemSolutionContentSocialMediaLanguageListDashboardViewÚ<ProblemSolutionContentSocialMediaLanguageDetailDashboardViewÚ;ProblemSolutionContentSocialMediaImageTextListDashboardViewÚ=ProblemSolutionContentSocialMediaImageTextDetailDashboardViewÚCProblemSolutionContentSocialMediaImageTextLanguageListDashboardViewÚEProblemSolutionContentSocialMediaImageTextLanguageDetailDashboardViewÚ:ProblemSolutionContentSocialMediaHashtagsListDashboardViewÚ<ProblemSolutionContentSocialMediaHashtagsDetailDashboardViewÚBProblemSolutionContentSocialMediaHashtagsLanguageListDashboardViewÚDProblemSolutionContentSocialMediaHashtagsLanguageDetailDashboardViewÚ1ProblemSolutionContentAppContentListDashboardViewÚ3ProblemSolutionContentAppContentDetailDashboardViewÚ9ProblemSolutionContentAppContentLanguageListDashboardViewÚ;ProblemSolutionContentAppContentLanguageDetailDashboardViewÚ?ProblemSolutionContentAppContentPossibleCausesListDashboardViewÚAProblemSolutionContentAppContentPossibleCausesDetailDashboardViewÚGProblemSolutionContentAppContentPossibleCausesLanguageListDashboardViewÚIProblemSolutionContentAppContentPossibleCausesLanguageDetailDashboardViewÚEProblemSolutionContentAppContentRecommendedSolutionsListDashboardViewÚGProblemSolutionContentAppContentRecommendedSolutionsDetailDashboardViewÚMProblemSolutionContentAppContentRecommendedSolutionsLanguageListDashboardViewÚOProblemSolutionContentAppContentRecommendedSolutionsLanguageDetailDashboardView)Ú!RelatableContentListDashboardViewÚ#RelatableContentDetailDashboardViewÚ,RelatableContentSocialMediaListDashboardViewÚ.RelatableContentSocialMediaDetailDashboardViewÚ4RelatableContentSocialMediaLanguageListDashboardViewÚ6RelatableContentSocialMediaLanguageDetailDashboardViewÚ4RelatableContentSocialMediaHashtagsListDashboardViewÚ6RelatableContentSocialMediaHashtagsDetailDashboardViewÚ<RelatableContentSocialMediaHashtagsLanguageListDashboardViewÚ>RelatableContentSocialMediaHashtagsLanguageDetailDashboardViewÚ+RelatableContentAppContentListDashboardViewÚ-RelatableContentAppContentDetailDashboardViewÚ3RelatableContentAppContentLanguageListDashboardViewÚ5RelatableContentAppContentLanguageDetailDashboardView)ÚStoryContentListDashboardViewÚStoryContentDetailDashboardViewÚ(StoryContentSocialMediaListDashboardViewÚ*StoryContentSocialMediaDetailDashboardViewÚ0StoryContentSocialMediaLanguageListDashboardViewÚ2StoryContentSocialMediaLanguageDetailDashboardViewÚ0StoryContentSocialMediaHashtagsListDashboardViewÚ2StoryContentSocialMediaHashtagsDetailDashboardViewÚ8StoryContentSocialMediaHashtagsLanguageListDashboardViewÚ:StoryContentSocialMediaHashtagsLanguageDetailDashboardViewÚ'StoryContentAppContentListDashboardViewÚ)StoryContentAppContentDetailDashboardViewÚ/StoryContentAppContentLanguageListDashboardViewÚ1StoryContentAppContentLanguageDetailDashboardView)ÚTipQuoteListDashboardViewÚTipQuoteDetailDashboardViewÚ!TipQuoteLanguageListDashboardViewÚ#TipQuoteLanguageDetailDashboardViewc                   @   s$   e Zd ZeegZeZg Zdd„ Z	dS )ÚImportArticleDashboardViewc                 O   sZ   | j |jd�}|jdd� t|jƒ\}}t|j|j||rdnddœ|r(tj	d�S tj
d�S )N)ÚdataT)Úraise_exceptionzArticle created.zArticle updated.)ÚidÚkeyNameÚ	isCreatedÚmessage)r   )Úget_serializerrž   Úis_validr   Úvalidated_datar   r    r¡   r   ÚHTTP_201_CREATEDÚHTTP_200_OK)ÚselfÚrequestÚargsÚkwargsÚ
serializerÚarticleÚcreated© r°   úZ/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/mama_care_api/article/views.pyÚpostÃ   s   
üùùzImportArticleDashboardView.postN)
Ú__name__Ú
__module__Ú__qualname__r   r   Úauthentication_classesr	   Úserializer_classÚquerysetr²   r°   r°   r°   r±   r�   ¾   s
    r�   N)¬Úrest_frameworkr   r   Úrest_framework.responser   Úcommon.viewsr   r   Úimport_articler   Úserializersr	   Ú+article_of_the_day.article_of_the_day_viewsr
   r   r   Úapp_actions.app_actions_viewsr   r   r   r   r   r   r   r   r   r   r   r   Úchecklist.checklist_viewsr   r   r   r   r   r   r   r    Ú-content_information.content_information_viewsr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   Ú#content_safety.content_safety_viewsr+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   Ú)education_content.education_content_viewsr7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   Ú-interactive_content.interactive_content_viewsrM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   Ú7problem_solution_content.problem_solution_content_viewsrc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   Ú)relatable_content.relatable_content_viewsr}   r~   r   r€   r�   r‚   rƒ   r„   r…   r†   r‡   rˆ   r‰   rŠ   Ú!story_content.story_content_viewsr‹   rŒ   r�   rŽ   r�   r�   r‘   r’   r“   r”   r•   r–   r—   r˜   Útip_quote.tip_quote_viewsr™   rš   r›   rœ   ÚGenericAPIViewr�   r°   r°   r°   r±   Ú<module>   s"    8(08``p@@