{"id":6255,"date":"2022-04-06T13:48:01","date_gmt":"2022-04-06T05:48:01","guid":{"rendered":"https:\/\/egonlin.com\/?p=6255"},"modified":"2022-04-26T13:53:00","modified_gmt":"2022-04-26T05:53:00","slug":"%e7%ac%ac%e5%8d%81%e4%b8%80%e8%8a%82%ef%bc%9a","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=6255","title":{"rendered":"\u7b2c\u5341\u4e00\u8282\uff1a\u63d2\u5165\u8f6e\u64ad\u56fe"},"content":{"rendered":"<h1>\u63d2\u5165\u8f6e\u64ad\u56fe<\/h1>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2022\/04\/\u63d2\u5165\u8f6e\u64ad\u56fe1.jpg'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2022\/04\/\u63d2\u5165\u8f6e\u64ad\u56fe1.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h2>\u4e00\u3001\u6dfb\u52a0\u8def\u7531<\/h2>\n<p>urls.py\u4e2d\u6dfb\u52a0<\/p>\n<pre><code class=\"language-python\">path(&#039;upload_swiper\/&#039;, views.upload_swiper, name=&#039;upload_swiper&#039;)<\/code><\/pre>\n<h2>\u4e8c\u3001\u6dfb\u52a0\u89c6\u56fe\u51fd\u6570<\/h2>\n<p>views.py\u4e2d\u6dfb\u52a0<\/p>\n<pre><code class=\"language-python\">def upload_swiper(request):\n    if request.method == &#039;POST&#039;:\n        file = request.FILES.get(&#039;swiper_img&#039;)\n        url = request.POST.get(&#039;url&#039;)\n        title = request.POST.get(&#039;title&#039;)\n        models.Swiper.objects.create(image=file, img_url=url, title=title)\n        return redirect(reverse(&#039;upload_swiper&#039;))\n    elif request.method == &#039;GET&#039;:\n        swiper_list = models.Swiper.objects.all()\n        return render(request, &#039;other\/UploadSwiper.html&#039;, {&#039;swiper_list&#039;: swiper_list})<\/code><\/pre>\n<h2>\u4e09\u3001\u8f6e\u64ad\u56fe\u529f\u80fd\u6d89\u53ca\u7684\u6a21\u578b\u5c42\u64cd\u4f5c<\/h2>\n<p>\u6beb\u65e0\u7591\u95ee,\u63d2\u5165\u8f6e\u64ad\u56fe\u529f\u80fd\u64cd\u4f5c\u7684\u5c06\u662f\u8f6e\u64ad\u56fe\u7684\u6570\u636e\u6a21\u578b.<\/p>\n<h2>\u56db\u3001\u8f6e\u64ad\u56fe\u529f\u80fd\u7684\u524d\u7aef\u6a21\u677f<\/h2>\n<p><\/p><div id=\"rml_readmorelogin_placeholder\" style=\"position:relative;\"><div id=\"rml_fade_content\" style=\"position: absolute;\r\ntop:-10em;\r\nwidth:100%;\r\nheight:10em;\r\nbackground: -webkit-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -moz-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -o-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -ms-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\"><\/div><div class=\"wpf-controller aru_rml_from_in_post\" style=\"background-color:#eeeeee;border:5px solid #cce6ff;\" id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><h2 id=\"Header\">\u67e5\u770b\u66f4\u591a<\/h2><div id=\"Message\"><p>\u8054\u7cfb\u7ba1\u7406\u5458\u5fae\u4fe1tutu19192010\uff0c\u6ce8\u518c\u8d26\u53f7<\/p>\n<\/div><div id=\"StatusBarHeader\"><\/div><form id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><input name=\"post_id\" value=\"6255\" type=\"hidden\"\/><input name=\"_init_callback\" value=\"InitLogin\" type=\"hidden\"\/><input name=\"post_id\" value=\"6255\" type=\"hidden\"\/><input name=\"rt_ype\" value=\"1\" type=\"hidden\"\/><input name=\"nonce\" value=\"c3582a2469\" type=\"hidden\"\/><input name=\"_wpnonce\" value=\"62dfcfae4b\" type=\"hidden\"\/><input name=\"_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_proxy_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_view\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginView\" type=\"hidden\"\/><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\" width=\"400px\"><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Username:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"username\" value=\"\" type=\"text\"\/><\/td><\/tr><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Password:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"password\" value=\"\" type=\"password\"\/><\/td><\/tr><\/tbody><\/table><p class=\"wpf-table-placeholder submit\"><button class=\"wp_plugin_framework_ajax_button\" type=\"button\" style=\"background-color:#4D90FE;;color:#ffffff;;border:1px solid #3079ed;\" name=\"_event\" value=\"ButtonLogin\">Log in<\/button><\/p><\/td><td class=\"wpf-table-placeholder-input\"><\/td><\/tr><\/tbody><\/table><\/form><div id=\"ButtonStartRegister\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=register\">Register<\/a><\/div><div id=\"Link1\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=lostpassword\">Forgotten username or password?<\/a><\/div><div id=\"StatusBarFooter\"><\/div><\/div><\/div><div id=aru_remaining_content><\/div>","protected":false},"excerpt":{"rendered":"<p>\u63d2\u5165\u8f6e\u64ad\u56fe \u4e00\u3001\u6dfb\u52a0\u8def\u7531 urls.py\u4e2d\u6dfb\u52a0 path(&#039;upload_swiper\/&#039; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":6822,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,406],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/6255"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6255"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/6255\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/6822"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}