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

App Engine 開發服務器在更改時不會重新加載代碼

App Engine Development Server Does Not Reload Code When Changed(App Engine 開發服務器在更改時不會重新加載代碼)
本文介紹了App Engine 開發服務器在更改時不會重新加載代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在開發一個將在 Google App Engine 之上運行的 python 應用程序.我使用以下目錄結構設置我的應用程序:

I'm working on a python app that will run on top of Google App Engine. I setup my app up with the following directory structure:

approot/
  app.yaml
  index.yaml
  myapp.py
  controllers/
   some_controller.py
   some_controller1.py
  models/
  views/

...etc...

我的問題是,當我進行更改時,開發服務器不會總是自動重新加載我的代碼,即使 Google 的文檔說它會這樣做.

My problem is that the development server will not always automatically reload my code when I make changes even though Google's documentation says it will.

它重新加載我的代碼的唯一時間是當我所做的更改位于我的應用程序的頂級目錄中時.子目錄中的任何內容(例如控制器)都將被忽略.每次進行更改時,我都必須停止并啟動服務器.

The only time it does reload my code is when the change I make is in the top level directory of my app. Anything in a subdirectory (e.g. controllers) is ignored. I have to stop and start the server every time a change is made.

我發現這確實阻礙了我的開發進度,特別是因為沒有重啟按鈕,你實際上必須點擊停止然后開始.

I find this really impedes my progress in development, especially since there is no restart button, you actually have to hit stop and then start.

有沒有辦法解決這個問題,還是我做錯了?我真的很喜歡有一個組織良好的項目,并且不想將我所有的文件都轉儲到頂級目錄中.

Is there a remedy for this or am I just doing it wrong? I really like having a well organized project and would rather not dump all my files in the top level directory.

推薦答案

重載機制可能與默認導入機制和內置 __import__ 函數相關.如果您(或您的框架)以其他巧妙的方式加載模塊,重新加載器可能不會注意到.一種可能的解決方法是在 myapp.py 模塊中顯式導入關鍵模塊.

The reload mechanism is likely tied to the default import mechanism and builtin __import__ function. If you (or your framework) load your modules in some other, clever way, the reloader might not notice. A possible workaround is to explicitly import key modules in your myapp.py module.

這篇關于App Engine 開發服務器在更改時不會重新加載代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

How should I verify a log message when testing Python code under nose?(在鼻子下測試 Python 代碼時,我應該如何驗證日志消息?)
Patch __call__ of a function(修補函數的 __call__)
How to call self in a mock method of an object in Python?(如何在 Python 中對象的模擬方法中調用 self?)
Mocking only a single method on an object(僅模擬對象上的單個方法)
Mocking a subprocess call in Python(在 Python 中模擬子進程調用)
Checking call order across multiple mocks(檢查多個模擬的調用順序)
主站蜘蛛池模板: 日韩av一区二区在线 | 亚洲欧洲视频 | 日韩成人在线观看 | 国产最新视频在线 | 国产精品久久久久久久 | 日韩高清黄色 | 精品国产乱码久久久久久蜜柚 | 超碰成人免费 | 视频在线一区二区 | 欧美一级www片免费观看 | 日韩午夜影院 | 日韩美女一区二区三区在线观看 | 欧美日韩视频在线第一区 | 在线播放国产一区二区三区 | 特黄特色大片免费视频观看 | 欧美国产日韩精品 | 中文字幕视频在线观看 | 亚洲视频一区二区 | 亚洲精品美女在线观看 | 国产黄色av电影 | 欧美精品久久 | 成人在线观看免费爱爱 | www.狠狠干 | 国产精品一区三区 | 五月综合激情在线 | 亚洲欧美国产精品一区二区 | 欧美精产国品一二三区 | 久久一区二区三区四区 | 亚洲 欧美 日韩在线 | 国产精品美女在线观看 | 一区二区三区亚洲视频 | 91综合在线观看 | 国产特级毛片aaaaaa | 精品真实国产乱文在线 | 亚洲美女网站 | 欧美小视频在线观看 | 国产亚洲精品精品国产亚洲综合 | 狠狠干网| 91麻豆精品国产91久久久更新资源速度超快 | 久久久久国产精品一区二区 | 欧美日韩一区二区在线播放 |