久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='lFqy3'></tfoot>

<small id='lFqy3'></small><noframes id='lFqy3'>

  • <i id='lFqy3'><tr id='lFqy3'><dt id='lFqy3'><q id='lFqy3'><span id='lFqy3'><b id='lFqy3'><form id='lFqy3'><ins id='lFqy3'></ins><ul id='lFqy3'></ul><sub id='lFqy3'></sub></form><legend id='lFqy3'></legend><bdo id='lFqy3'><pre id='lFqy3'><center id='lFqy3'></center></pre></bdo></b><th id='lFqy3'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lFqy3'><tfoot id='lFqy3'></tfoot><dl id='lFqy3'><fieldset id='lFqy3'></fieldset></dl></div>

        <legend id='lFqy3'><style id='lFqy3'><dir id='lFqy3'><q id='lFqy3'></q></dir></style></legend>

        • <bdo id='lFqy3'></bdo><ul id='lFqy3'></ul>

        在 Tastypie 中獲取請求參數

        get request parameters in Tastypie(在 Tastypie 中獲取請求參數)

          <small id='2DzvG'></small><noframes id='2DzvG'>

          • <bdo id='2DzvG'></bdo><ul id='2DzvG'></ul>
          • <legend id='2DzvG'><style id='2DzvG'><dir id='2DzvG'><q id='2DzvG'></q></dir></style></legend>
          • <i id='2DzvG'><tr id='2DzvG'><dt id='2DzvG'><q id='2DzvG'><span id='2DzvG'><b id='2DzvG'><form id='2DzvG'><ins id='2DzvG'></ins><ul id='2DzvG'></ul><sub id='2DzvG'></sub></form><legend id='2DzvG'></legend><bdo id='2DzvG'><pre id='2DzvG'><center id='2DzvG'></center></pre></bdo></b><th id='2DzvG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2DzvG'><tfoot id='2DzvG'></tfoot><dl id='2DzvG'><fieldset id='2DzvG'></fieldset></dl></div>

              <tfoot id='2DzvG'></tfoot>

                <tbody id='2DzvG'></tbody>
                  本文介紹了在 Tastypie 中獲取請求參數的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在為我的應用程序構建一個 REST API,該應用程序使用 Tastypie 的 NoSQL db (Neo4j).

                  I am building a REST API for my application that uses a NoSQL db (Neo4j) using Tastypie.

                  所以我重寫了類 tastypie.resources.Resource 的一些主要方法,目前正在努力實現 def obj_get_list(self, request=None, **kwargs): 應該返回一個對象列表.

                  So I overrode some main methods of the class tastypie.resources.Resource to do so, and currently struggling to implement def obj_get_list(self, request=None, **kwargs): which is supposed to return a list of objects.

                  實際上,我想通過 url 將參數傳遞給此方法(類似于 http://127.0.0.1:8000/api/airport/?query='aQuery' )然后根據此參數執行查詢.

                  Actually, I want to pass a parameter to this method through the url (something like http://127.0.0.1:8000/api/airport/?query='aQuery' ) and then perform a query based on this parameter.

                  問題是請求是 None 所以我不能得到它的參數!

                  The problem is that the request is None so I can't get its parameter !

                  在打印 kwargs 變量時,我看到了這個:

                  When printing the kwargs variable, I see this :

                  {'bundle': <Bundle for obj: '<testNeo4Django.testapp.api.Airport object at 0x9d829ac>' and with data: '{}'>}
                  

                  感謝您的幫助

                  推薦答案

                  當前位置參數 request 沒有傳遞給obj_get_list.

                  Currently positional argument request is not passed toobj_get_list.

                  所以你應該:

                  def obj_get_list(self, bundle, **kwargs):
                  
                      param =  bundle.request.GET['param']
                      #fetch objects based on param
                      return objects
                  

                  這篇關于在 Tastypie 中獲取請求參數的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                    <bdo id='CKXkL'></bdo><ul id='CKXkL'></ul>
                  • <i id='CKXkL'><tr id='CKXkL'><dt id='CKXkL'><q id='CKXkL'><span id='CKXkL'><b id='CKXkL'><form id='CKXkL'><ins id='CKXkL'></ins><ul id='CKXkL'></ul><sub id='CKXkL'></sub></form><legend id='CKXkL'></legend><bdo id='CKXkL'><pre id='CKXkL'><center id='CKXkL'></center></pre></bdo></b><th id='CKXkL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CKXkL'><tfoot id='CKXkL'></tfoot><dl id='CKXkL'><fieldset id='CKXkL'></fieldset></dl></div>
                      <tbody id='CKXkL'></tbody>
                    • <legend id='CKXkL'><style id='CKXkL'><dir id='CKXkL'><q id='CKXkL'></q></dir></style></legend>

                      <small id='CKXkL'></small><noframes id='CKXkL'>

                      <tfoot id='CKXkL'></tfoot>

                          • 主站蜘蛛池模板: 国产精品免费福利 | 三级成人在线 | 亚洲啊v在线 | 国产成人免费 | 亚洲传媒在线 | 美国一级黄色片 | 日本成人三级电影 | 久久成人免费 | 亚洲视频免费观看 | 久久久久久女 | 北条麻妃99精品青青久久 | 伦理午夜电影免费观看 | 日本视频在线播放 | 国产在线精品一区 | 日韩欧美三区 | 天天操夜夜操 | 日韩av免费在线观看 | 日本网站在线看 | 99久久免费精品国产免费高清 | 久久精品视频12 | 日韩精品一区二区三区 | 全免费a级毛片免费看视频免费下 | 国产做a爱片久久毛片 | 欧美一级艳情片免费观看 | 久久尤物免费一区二区三区 | 亚洲日本三级 | 精品亚洲一区二区三区四区五区 | 精品av| 日韩欧美一区二区三区四区 | 91精品久久久久久久 | 91精品国产91久久久久久 | 国产乱码久久久久久 | 欧美日韩大片 | 99色综合 | 午夜精品久久久久久久久久久久 | 国产aaaaav久久久一区二区 | 激情一区二区三区 | 久色网| av毛片 | 久久噜噜噜精品国产亚洲综合 | 国产在线精品区 |