当前位置: 首页>>代码示例>>Python>>正文


Python SoftwareSecurePhotoVerification.save方法代码示例

本文整理汇总了Python中verify_student.models.SoftwareSecurePhotoVerification.save方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareSecurePhotoVerification.save方法的具体用法?Python SoftwareSecurePhotoVerification.save怎么用?Python SoftwareSecurePhotoVerification.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在verify_student.models.SoftwareSecurePhotoVerification的用法示例。


在下文中一共展示了SoftwareSecurePhotoVerification.save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_initial_verification_for_user

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_initial_verification_for_user(self):
        """Test that method 'get_initial_verification' of model
        'SoftwareSecurePhotoVerification' always returns the initial
        verification with field 'photo_id_key' set against a user.
        """
        user = UserFactory.create()

        # No initial verification for the user
        result = SoftwareSecurePhotoVerification.get_initial_verification(user=user)
        self.assertIs(result, None)

        # Make an initial verification with 'photo_id_key'
        attempt = SoftwareSecurePhotoVerification(user=user, photo_id_key="dummy_photo_id_key")
        attempt.status = 'approved'
        attempt.save()

        # Check that method 'get_initial_verification' returns the correct
        # initial verification attempt
        first_result = SoftwareSecurePhotoVerification.get_initial_verification(user=user)
        self.assertIsNotNone(first_result)

        # Now create a second verification without 'photo_id_key'
        attempt = SoftwareSecurePhotoVerification(user=user)
        attempt.status = 'submitted'
        attempt.save()

        # Test method 'get_initial_verification' still returns the correct
        # initial verification attempt which have 'photo_id_key' set
        second_result = SoftwareSecurePhotoVerification.get_initial_verification(user=user)
        self.assertIsNotNone(second_result)
        self.assertEqual(second_result, first_result)
开发者ID:Certific-NET,项目名称:edx-platform,代码行数:33,代码来源:test_models.py

示例2: post

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def post(self, request, course_id):
        """
        submits the reverification to SoftwareSecure
        """
        try:
            now = datetime.datetime.now(UTC)
            course_id = CourseKey.from_string(course_id)
            window = MidcourseReverificationWindow.get_window(course_id, now)
            if window is None:
                raise WindowExpiredException
            attempt = SoftwareSecurePhotoVerification(user=request.user, window=window)
            b64_face_image = request.POST["face_image"].split(",")[1]

            attempt.upload_face_image(b64_face_image.decode("base64"))
            attempt.fetch_photo_id_image()
            attempt.mark_ready()

            attempt.save()
            attempt.submit()
            course_enrollment = CourseEnrollment.get_or_create_enrollment(request.user, course_id)
            course_enrollment.update_enrollment(mode="verified")
            course_enrollment.emit_event(EVENT_NAME_USER_SUBMITTED_MIDCOURSE_REVERIFY)
            return HttpResponseRedirect(reverse("verify_student_midcourse_reverification_confirmation"))

        except WindowExpiredException:
            log.exception(
                "User {} attempted to re-verify, but the window expired before the attempt".format(request.user.id)
            )
            return HttpResponseRedirect(reverse("verify_student_reverification_window_expired"))

        except Exception:
            log.exception("Could not submit verification attempt for user {}".format(request.user.id))
            context = {"user_full_name": request.user.profile.name, "error": True}
            return render_to_response("verify_student/midcourse_photo_reverification.html", context)
开发者ID:olexiim,项目名称:edx-platform,代码行数:36,代码来源:views.py

示例3: test_user_status

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_user_status(self):
        # test for correct status when no error returned
        user = UserFactory.create()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('none', ''))

        # test for when one has been created
        attempt = SoftwareSecurePhotoVerification(user=user)
        attempt.status = 'approved'
        attempt.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('approved', ''))

        # create another one for the same user, make sure the right one is
        # returned
        attempt2 = SoftwareSecurePhotoVerification(user=user)
        attempt2.status = 'denied'
        attempt2.error_msg = '[{"photoIdReasons": ["Not provided"]}]'
        attempt2.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('approved', ''))

        # now delete the first one and verify that the denial is being handled
        # properly
        attempt.delete()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('must_reverify', "No photo ID was provided."))
开发者ID:benpatterson,项目名称:edx-platform,代码行数:31,代码来源:test_models.py

示例4: post

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def post(self, request):
        """
        submits the reverification to SoftwareSecure
        """

        try:
            attempt = SoftwareSecurePhotoVerification(user=request.user)
            b64_face_image = request.POST['face_image'].split(",")[1]
            b64_photo_id_image = request.POST['photo_id_image'].split(",")[1]

            attempt.upload_face_image(b64_face_image.decode('base64'))
            attempt.upload_photo_id_image(b64_photo_id_image.decode('base64'))
            attempt.mark_ready()

            # save this attempt
            attempt.save()
            # then submit it across
            attempt.submit()
            return HttpResponseRedirect(reverse('verify_student_reverification_confirmation'))
        except Exception:
            log.exception(
                "Could not submit verification attempt for user {}".format(request.user.id)
            )
            context = {
                "user_full_name": request.user.profile.name,
                "error": True,
            }
            return render_to_response("verify_student/photo_reverification.html", context)
开发者ID:nouaya,项目名称:edx-platform,代码行数:30,代码来源:views.py

示例5: create_order

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
def create_order(request):
    """
    Submit PhotoVerification and create a new Order for this verified cert
    """
    if not SoftwareSecurePhotoVerification.user_has_valid_or_pending(request.user):
        attempt = SoftwareSecurePhotoVerification(user=request.user)
        b64_face_image = request.POST['face_image'].split(",")[1]
        b64_photo_id_image = request.POST['photo_id_image'].split(",")[1]

        attempt.upload_face_image(b64_face_image.decode('base64'))
        attempt.upload_photo_id_image(b64_photo_id_image.decode('base64'))
        attempt.mark_ready()

        attempt.save()

    course_id = request.POST['course_id']
    course_id = SlashSeparatedCourseKey.from_deprecated_string(course_id)
    donation_for_course = request.session.get('donation_for_course', {})
    current_donation = donation_for_course.get(course_id, decimal.Decimal(0))
    contribution = request.POST.get("contribution", donation_for_course.get(course_id, 0))
    try:
        amount = decimal.Decimal(contribution).quantize(decimal.Decimal('.01'), rounding=decimal.ROUND_DOWN)
    except decimal.InvalidOperation:
        return HttpResponseBadRequest(_("Selected price is not valid number."))

    if amount != current_donation:
        donation_for_course[course_id] = amount
        request.session['donation_for_course'] = donation_for_course

    # prefer professional mode over verified_mode
    current_mode = CourseMode.verified_mode_for_course(course_id)

    if current_mode.slug == 'professional':
        amount = current_mode.min_price

    # make sure this course has a verified mode
    if not current_mode:
        return HttpResponseBadRequest(_("This course doesn't support verified certificates"))

    if amount < current_mode.min_price:
        return HttpResponseBadRequest(_("No selected price or selected price is below minimum."))

    # I know, we should check this is valid. All kinds of stuff missing here
    cart = Order.get_cart_for_user(request.user)
    cart.clear()
    enrollment_mode = current_mode.slug
    CertificateItem.add_to_order(cart, course_id, amount, enrollment_mode)

    callback_url = request.build_absolute_uri(
        reverse("shoppingcart.views.postpay_callback")
    )
    params = get_signed_purchase_params(
        cart, callback_url=callback_url
    )

    return HttpResponse(json.dumps(params), content_type="text/json")
开发者ID:VeritasU,项目名称:edx-platform,代码行数:58,代码来源:views.py

示例6: test_original_verification

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
 def test_original_verification(self):
     orig_attempt = SoftwareSecurePhotoVerification(user=self.user)
     orig_attempt.save()
     window = MidcourseReverificationWindowFactory(
         course_id=self.course.id,
         start_date=datetime.now(pytz.UTC) - timedelta(days=15),
         end_date=datetime.now(pytz.UTC) - timedelta(days=13),
     )
     midcourse_attempt = SoftwareSecurePhotoVerification(user=self.user, window=window)
     self.assertEquals(midcourse_attempt.original_verification(user=self.user), orig_attempt)
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:12,代码来源:test_models.py

示例7: test_user_status

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_user_status(self):
        # test for correct status when no error returned
        user = UserFactory.create()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('none', ''))

        # test for when one has been created
        attempt = SoftwareSecurePhotoVerification(user=user)
        attempt.status = 'approved'
        attempt.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('approved', ''))

        # create another one for the same user, make sure the right one is
        # returned
        attempt2 = SoftwareSecurePhotoVerification(user=user)
        attempt2.status = 'denied'
        attempt2.error_msg = '[{"photoIdReasons": ["Not provided"]}]'
        attempt2.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('approved', ''))

        # now delete the first one and verify that the denial is being handled
        # properly
        attempt.delete()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ('must_reverify', "No photo ID was provided."))

        # test for correct status for reverifications
        window = MidcourseReverificationWindowFactory()
        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ('must_reverify', ''))

        reverify_attempt = SoftwareSecurePhotoVerification(user=user, window=window)
        reverify_attempt.status = 'approved'
        reverify_attempt.save()

        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ('approved', ''))

        reverify_attempt.status = 'denied'
        reverify_attempt.save()

        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ('denied', ''))

        reverify_attempt.status = 'approved'
        # pylint: disable=protected-access
        reverify_attempt.created_at = SoftwareSecurePhotoVerification._earliest_allowed_date() + timedelta(days=-1)
        reverify_attempt.save()
        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        message = 'Your {platform_name} verification has expired.'.format(platform_name=settings.PLATFORM_NAME)
        self.assertEquals(reverify_status, ('expired', message))
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:57,代码来源:test_models.py

示例8: test_fetch_photo_id_image

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_fetch_photo_id_image(self):
        user = UserFactory.create()
        orig_attempt = SoftwareSecurePhotoVerification(user=user)
        orig_attempt.save()

        old_key = orig_attempt.photo_id_key

        new_attempt = SoftwareSecurePhotoVerification(user=user)
        new_attempt.save()
        new_attempt.fetch_photo_id_image()
        assert_equals(new_attempt.photo_id_key, old_key)
开发者ID:Shubhi01,项目名称:edx-platform,代码行数:13,代码来源:test_models.py

示例9: test_display

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_display(self):
        user = UserFactory.create()
        window = MidcourseReverificationWindowFactory()
        attempt = SoftwareSecurePhotoVerification(user=user, window=window, status="denied")
        attempt.save()

        # We expect the verification to be displayed by default
        self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), True)

        # Turn it off
        SoftwareSecurePhotoVerification.display_off(user.id)
        self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), False)
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:14,代码来源:test_models.py

示例10: test_user_has_valid_or_pending

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_user_has_valid_or_pending(self):
        window = MidcourseReverificationWindowFactory(
            course_id=self.course.id,
            start_date=datetime.now(pytz.UTC) - timedelta(days=15),
            end_date=datetime.now(pytz.UTC) - timedelta(days=13),
        )

        attempt = SoftwareSecurePhotoVerification(status="must_retry", user=self.user, window=window)
        attempt.save()

        assert_false(SoftwareSecurePhotoVerification.user_has_valid_or_pending(user=self.user, window=window))

        attempt.status = "approved"
        attempt.save()
        assert_true(SoftwareSecurePhotoVerification.user_has_valid_or_pending(user=self.user, window=window))
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:17,代码来源:test_models.py

示例11: test_fetch_photo_id_image

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_fetch_photo_id_image(self):
        user = UserFactory.create()
        orig_attempt = SoftwareSecurePhotoVerification(user=user, window=None)
        orig_attempt.save()

        old_key = orig_attempt.photo_id_key

        window = MidcourseReverificationWindowFactory(
            course_id=SlashSeparatedCourseKey("pony", "rainbow", "dash"),
            start_date=datetime.now(pytz.utc) - timedelta(days=5),
            end_date=datetime.now(pytz.utc) + timedelta(days=5)
        )
        new_attempt = SoftwareSecurePhotoVerification(user=user, window=window)
        new_attempt.save()
        new_attempt.fetch_photo_id_image()
        assert_equals(new_attempt.photo_id_key, old_key)
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:18,代码来源:test_models.py

示例12: test_user_is_reverified_for_all

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_user_is_reverified_for_all(self):

        # if there are no windows for a course, this should return True
        self.assertTrue(SoftwareSecurePhotoVerification.user_is_reverified_for_all(self.course.id, self.user))

        # first, make three windows
        window1 = MidcourseReverificationWindowFactory(
            course_id=self.course.id,
            start_date=datetime.now(pytz.UTC) - timedelta(days=15),
            end_date=datetime.now(pytz.UTC) - timedelta(days=13),
        )

        window2 = MidcourseReverificationWindowFactory(
            course_id=self.course.id,
            start_date=datetime.now(pytz.UTC) - timedelta(days=10),
            end_date=datetime.now(pytz.UTC) - timedelta(days=8),
        )

        window3 = MidcourseReverificationWindowFactory(
            course_id=self.course.id,
            start_date=datetime.now(pytz.UTC) - timedelta(days=5),
            end_date=datetime.now(pytz.UTC) - timedelta(days=3),
        )

        # make two SSPMidcourseReverifications for those windows
        attempt1 = SoftwareSecurePhotoVerification(
            status="approved",
            user=self.user,
            window=window1
        )
        attempt1.save()

        attempt2 = SoftwareSecurePhotoVerification(
            status="approved",
            user=self.user,
            window=window2
        )
        attempt2.save()

        # should return False because only 2 of 3 windows have verifications
        self.assertFalse(SoftwareSecurePhotoVerification.user_is_reverified_for_all(self.course.id, self.user))

        attempt3 = SoftwareSecurePhotoVerification(
            status="must_retry",
            user=self.user,
            window=window3
        )
        attempt3.save()

        # should return False because the last verification exists BUT is not approved
        self.assertFalse(SoftwareSecurePhotoVerification.user_is_reverified_for_all(self.course.id, self.user))

        attempt3.status = "approved"
        attempt3.save()

        # should now return True because all windows have approved verifications
        self.assertTrue(SoftwareSecurePhotoVerification.user_is_reverified_for_all(self.course.id, self.user))
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:59,代码来源:test_models.py

示例13: create_order

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
def create_order(request):
    """
    Submit PhotoVerification and create a new Order for this verified cert
    """
    if not SoftwareSecurePhotoVerification.user_has_valid_or_pending(request.user):
        attempt = SoftwareSecurePhotoVerification(user=request.user)
        b64_face_image = request.POST['face_image'].split(",")[1]
        b64_photo_id_image = request.POST['photo_id_image'].split(",")[1]

        attempt.upload_face_image(b64_face_image.decode('base64'))
        attempt.upload_photo_id_image(b64_photo_id_image.decode('base64'))
        attempt.mark_ready()

        attempt.save()

    course_id = request.POST['course_id']
    donation_for_course = request.session.get('donation_for_course', {})
    current_donation = donation_for_course.get(course_id, decimal.Decimal(0))
    contribution = request.POST.get("contribution", donation_for_course.get(course_id, 0))
    try:
        amount = decimal.Decimal(contribution).quantize(decimal.Decimal('.01'), rounding=decimal.ROUND_DOWN)
    except decimal.InvalidOperation:
        return HttpResponseBadRequest(_("Selected price is not valid number."))

    if amount != current_donation:
        donation_for_course[course_id] = amount
        request.session['donation_for_course'] = donation_for_course

    verified_mode = CourseMode.modes_for_course_dict(course_id).get('verified', None)

    # make sure this course has a verified mode
    if not verified_mode:
        return HttpResponseBadRequest(_("This course doesn't support verified certificates"))

    if amount < verified_mode.min_price:
        return HttpResponseBadRequest(_("No selected price or selected price is below minimum."))

    # I know, we should check this is valid. All kinds of stuff missing here
    cart = Order.get_cart_for_user(request.user)
    cart.clear()
    CertificateItem.add_to_order(cart, course_id, amount, 'verified')

    params = get_signed_purchase_params(cart)

    return HttpResponse(json.dumps(params), content_type="text/json")
开发者ID:DazzaGreenwood,项目名称:edx-platform,代码行数:47,代码来源:views.py

示例14: test_active_for_user

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_active_for_user(self):
        """
        Make sure we can retrive a user's active (in progress) verification
        attempt.
        """
        user = UserFactory.create()

        # This user has no active at the moment...
        assert_is_none(SoftwareSecurePhotoVerification.active_for_user(user))

        # Create an attempt and mark it ready...
        attempt = SoftwareSecurePhotoVerification(user=user)
        attempt.mark_ready()
        assert_equals(attempt, SoftwareSecurePhotoVerification.active_for_user(user))

        # A new user won't see this...
        user2 = UserFactory.create()
        user2.save()
        assert_is_none(SoftwareSecurePhotoVerification.active_for_user(user2))

        # If it's got a different status, it doesn't count
        for status in ["submitted", "must_retry", "approved", "denied"]:
            attempt.status = status
            attempt.save()
            assert_is_none(SoftwareSecurePhotoVerification.active_for_user(user))

        # But if we create yet another one and mark it ready, it passes again.
        attempt_2 = SoftwareSecurePhotoVerification(user=user)
        attempt_2.mark_ready()
        assert_equals(attempt_2, SoftwareSecurePhotoVerification.active_for_user(user))

        # And if we add yet another one with a later created time, we get that
        # one instead. We always want the most recent attempt marked ready()
        attempt_3 = SoftwareSecurePhotoVerification(
            user=user,
            created_at=attempt_2.created_at + timedelta(days=1)
        )
        attempt_3.save()

        # We haven't marked attempt_3 ready yet, so attempt_2 still wins
        assert_equals(attempt_2, SoftwareSecurePhotoVerification.active_for_user(user))

        # Now we mark attempt_3 ready and expect it to come back
        attempt_3.mark_ready()
        assert_equals(attempt_3, SoftwareSecurePhotoVerification.active_for_user(user))
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:47,代码来源:test_models.py

示例15: test_user_status

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import save [as 别名]
    def test_user_status(self):
        # test for correct status when no error returned
        user = UserFactory.create()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ("none", ""))

        # test for when one has been created
        attempt = SoftwareSecurePhotoVerification(user=user)
        attempt.status = "approved"
        attempt.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ("approved", ""))

        # create another one for the same user, make sure the right one is
        # returned
        attempt2 = SoftwareSecurePhotoVerification(user=user)
        attempt2.status = "denied"
        attempt2.error_msg = '[{"photoIdReasons": ["Not provided"]}]'
        attempt2.save()

        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ("approved", ""))

        # now delete the first one and verify that the denial is being handled
        # properly
        attempt.delete()
        status = SoftwareSecurePhotoVerification.user_status(user)
        self.assertEquals(status, ("must_reverify", "No photo ID was provided."))

        # test for correct status for reverifications
        window = MidcourseReverificationWindowFactory()
        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ("must_reverify", ""))

        reverify_attempt = SoftwareSecurePhotoVerification(user=user, window=window)
        reverify_attempt.status = "approved"
        reverify_attempt.save()

        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ("approved", ""))

        reverify_attempt.status = "denied"
        reverify_attempt.save()

        reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window)
        self.assertEquals(reverify_status, ("denied", ""))
开发者ID:XiaodunServerGroup,项目名称:medicalmooc,代码行数:49,代码来源:test_models.py


注:本文中的verify_student.models.SoftwareSecurePhotoVerification.save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。