{"action":"created","issue":{"url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/1","repository_url":"https://api.github.com/repos/mtianyan/mtianyanSearch","labels_url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/1/comments","events_url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/1/events","html_url":"https://github.com/mtianyan/mtianyanSearch/issues/1","id":300503283,"number":1,"title":"您好，我在学习您的教程中，遇到了一些问题，来寻求您的帮助，感谢！","user":{"login":"JRICKL","id":17766351,"avatar_url":"https://avatars2.githubusercontent.com/u/17766351?v=4","gravatar_id":"","url":"https://api.github.com/users/JRICKL","html_url":"https://github.com/JRICKL","followers_url":"https://api.github.com/users/JRICKL/followers","following_url":"https://api.github.com/users/JRICKL/following{/other_user}","gists_url":"https://api.github.com/users/JRICKL/gists{/gist_id}","starred_url":"https://api.github.com/users/JRICKL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JRICKL/subscriptions","organizations_url":"https://api.github.com/users/JRICKL/orgs","repos_url":"https://api.github.com/users/JRICKL/repos","events_url":"https://api.github.com/users/JRICKL/events{/privacy}","received_events_url":"https://api.github.com/users/JRICKL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-27T05:58:50Z","updated_at":"2018-03-10T08:42:41Z","closed_at":null,"author_association":"NONE","body":"我在进行搜索补全的时候出现了问题，code完成后并没有得到正确的显示效果\r\n初步怀疑应该是django版本的问题\r\n出现的问题如下：\r\n\r\n    System check identified no issues (0 silenced).\r\n    February 27, 2018 - 12:22:10\r\n    Django version 2.0.1, using settings 'lcv_search.settings'\r\n    Starting development server at http://127.0.0.1:8000/\r\n    Quit the server with CTRL-BREAK.\r\n    [27/Feb/2018 12:22:19] \"GET / HTTP/1.1\" 200 5670\r\n    [27/Feb/2018 12:22:19] \"GET /static/css/style.css HTTP/1.1\" 200 2822\r\n    [27/Feb/2018 12:22:19] \"GET /static/css/index.css HTTP/1.1\" 200 1846\r\n    [27/Feb/2018 12:22:19] \"GET /static/js/global.js HTTP/1.1\" 200 750\r\n    [27/Feb/2018 12:22:20] \"GET /static/js/jquery.js HTTP/1.1\" 200 252978\r\n    [27/Feb/2018 12:22:20] \"GET /static/img/inputbg.png HTTP/1.1\" 200 2841\r\n    [27/Feb/2018 12:22:20] \"GET /static/img/seachbtn.png HTTP/1.1\" 200 5163\r\n    [27/Feb/2018 12:22:20] \"GET /static/img/logo.png HTTP/1.1\" 200 2651\r\n    Not Found: /favicon.ico\r\n    [27/Feb/2018 12:22:21] \"GET /favicon.ico HTTP/1.1\" 404 2214\r\n    Method Not Allowed (GET): /suggest/\r\n    [27/Feb/2018 12:22:22] \"GET /suggest/?s=s&s_type=article&_=1519705342620 HTTP/1.1\" 405 0\r\n    [27/Feb/2018 12:31:54] \"GET / HTTP/1.1\" 200 5670\r\n    Method Not Allowed (GET): /suggest/\r\n    [27/Feb/2018 12:32:00] \"GET /suggest/?s=s&s_type=article&_=1519705920782 HTTP/1.1\" 405 0\r\n    Method Not Allowed (GET): /suggest/\r\n    [27/Feb/2018 12:32:01] \"GET /suggest/?s=ss&s_type=article&_=1519705921028 HTTP/1.1\" 405 0\r\n    Method Not Allowed (GET): /suggest/\r\n    [27/Feb/2018 12:32:01] \"GET /suggest/?s=sss&s_type=article&_=1519705921066 HTTP/1.1\" 405 0\r\n    Method Not Allowed (GET): /suggest/\r\n    [27/Feb/2018 12:32:01] \"GET /suggest/?s=ssss&s_type=article&_=1519705921099 HTTP/1.1\" 405 0\r\n\r\n这是我在控制台中执行\r\n\r\n    python manage.py runserver\r\n\r\n后打印出来的日志，然后我在把我项目里代码贴出来\r\nurls.py\r\n`\r\n    urlpatterns = [\r\n        path('admin/', admin.site.urls),\r\n        path('', TemplateView.as_view(template_name='index.html'),name='index'),\r\n        path('suggest/', SearchSuggest.as_view(),name='suggest'),\r\n    ]\r\n`\r\nviews.py\r\n`\r\n    class SearchSuggest(View):\r\n        def suggest(self,request):\r\n            key_words = request.GET.get('s','')\r\n            re_datas=[]\r\n            if key_words:\r\n                s = ArticleType.search()\r\n                s = s.suggest('my_suggest',key_words,completion={\r\n                    \"field\":\"suggest\",\"fuzzy\":{\r\n                        \"fuzziness\":2\r\n                    },\r\n                    \"size\":10\r\n                })\r\n                suggestions = s.execute_suggest()\r\n                for match in suggestions.my_suggest[0].options:\r\n                    source = match._source\r\n                    re_datas.append(source[\"title\"])\r\n            return HttpResponse(json.dumps(re_datas), content_type=\"appliction/json\")\r\n`\r\nindex.html\r\n`\r\n    <script type=\"text/javascript\">\r\n        var suggest_url = \"{% url 'suggest' %}\"\r\n        var search_url = \"/search/\"\r\n`"},"comment":{"url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/comments/372013913","html_url":"https://github.com/mtianyan/mtianyanSearch/issues/1#issuecomment-372013913","issue_url":"https://api.github.com/repos/mtianyan/mtianyanSearch/issues/1","id":372013913,"user":{"login":"luaaaa","id":36943445,"avatar_url":"https://avatars3.githubusercontent.com/u/36943445?v=4","gravatar_id":"","url":"https://api.github.com/users/luaaaa","html_url":"https://github.com/luaaaa","followers_url":"https://api.github.com/users/luaaaa/followers","following_url":"https://api.github.com/users/luaaaa/following{/other_user}","gists_url":"https://api.github.com/users/luaaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/luaaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luaaaa/subscriptions","organizations_url":"https://api.github.com/users/luaaaa/orgs","repos_url":"https://api.github.com/users/luaaaa/repos","events_url":"https://api.github.com/users/luaaaa/events{/privacy}","received_events_url":"https://api.github.com/users/luaaaa/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T08:42:41Z","updated_at":"2018-03-10T08:42:41Z","author_association":"NONE","body":"https://github.com/luaaaa/video"}}
{"actor":{"display_login":"luaaaa"}}