Beispiel #1
0
    def dehydrate_content(self, bundle):
        if hasattr(bundle.request, 'user'):

            user_profile = UserProfile.objects.get(user = bundle.request.user)

            if user_profile.is_evernote_synced:
                ev_h = EvernoteHelper(user_profile.evernote_profile)

                return ev_h.replace_images(bundle.obj.content, bundle.obj.evernote_guid)
            else:
                return bundle.obj.content