pyramid

    -1熱度

    1回答

    源代碼: from wsgiref.simple_server import make_server from pyramid.config import Configurator from pyramid.response import Response def hello_world(request): return Response('<h1>Hello world!</h

    1熱度

    1回答

    我有一個現有的Pyramid應用程序使用URL調度。它有形式爲'/kind1/{id1}/kind2/{id2}.../action'的網址。所以遍歷應該是理想的,但它沒有被使用。 在每個視圖中都有一個函數調用,它從url中獲取實例。例如,可能會有一個電話,如thingy_instance = get_thingy_from_url(request) 現在我需要爲視圖添加權限。所以我添加了上下文工

    2熱度

    1回答

    我正在嘗試重新加載基於網頁上某些用戶選擇的離線Plotly圖。我正在使用金字塔來生成網頁。當用戶輸入已被捕獲,我使用下面的jQuery來生成內容爲一個div: $.getJSON("{{ request.route_url('park_list') }}" + "feature_plot/feature_ids=" + ids_string, function(data) { docum

    2熱度

    1回答

    我正試圖圍繞金字塔1.6+中的「上下文」謂詞的用處。只有使用URLDispatch例如,當,我可能有一個視圖中調用它的裝飾是這樣的: @view_config(route_name="employee_edit", context=Employee) ... 而且讓我們說我有這樣定義的路由,與路由工廠定義: config.add_route("employee_edit","/employe

    1熱度

    1回答

    我有一個金字塔網頁設置。其中一個觀點確實是這樣的: - sql_list = do_a_query() handle_a_post_request(request) return dict(sql_list=sql_list) def do_a_query(): request.db.query(WhatIAmLookingFor) 的(灰鯖鯊,但我認爲這是不相關的),那麼模

    1熱度

    1回答

    獨特SQLAlchemy的數據庫連接,我有這個金字塔的應用: from pyramid.config import Configurator from pyramid.response import Response from sqlalchemy import create_engine from sqlalchemy.pool import QueuePool from sqlalc

    5熱度

    1回答

    對於舊版本的金字塔設置爲SQLAlchemy的會話與此類似 DBSession = scoped_session( sessionmaker( autoflush=True, expire_on_commit=False, extension=zope.sqlalchemy.ZopeTransactionExtension() ) scoop

    7熱度

    3回答

    問題:如何解決在Windows中執行pvu虛擬字符錯誤的問題? 描述:我試圖在windows上的virtualenv內執行pserve(pyllons/pyramid development web server)。這是全新的安裝,所以它可能與版本有關。 問題:隨着virtualenv激活,執行pserve config.ini拋出錯誤:SyntaxError: Non-ASCII charact

    0熱度

    2回答

    這是錯誤日誌我Heroku的部署找到python的金字塔應用程序時。我已經遵循了python金字塔文檔的每一個步驟。我在哪裏錯過了無法弄清楚的地方。 我懷疑我的方式創建運行文件是不正確的。我創建了一個run.py file and added the following code into it. #!/bin/bash set -e python setup.py develop pyt

    0熱度

    2回答

    根據該文檔(http://docs.pylonsproject.org/projects/waitress/en/latest/): 服務員將其記錄輸出(包括應用程序異常 渲染)到命名服務員的Python記錄器對象。您可以使用正常的Python 記錄模塊API影響記錄器級別和輸出流。 這是所有文件的意見。我試圖將日誌記錄輸出重定向到stdout。我將如何去做這個pastedeploy .ini文件