noir

    3熱度

    1回答

    我一直在一個web項目中使用noir,並且根據他們的訪問級別(以及sublevel)來定義由defpage宏定義的所有可能的路由,我想到了限制對用戶的訪問。所以,我原本 (defpage [:post "/mysite"] {:as input} (if-not (has-reqd-user-level? :levelX :sublevelY "/grantedRoute")

    2熱度

    2回答

    我對clojure/compojure相當陌生,但真的很喜歡它。自然,我開始用Noir堆棧進行探索。已經寫了一個POC應用程序。然後,發現解放者 - 有很多意義。只是想知道,如果有人曾經將Noir應用程序遷移到Liberator之前。任何有關此文章/博客的參考資料都將受到高度讚賞。

    0熱度

    1回答

    我想不出我無法在noir應用程序中加載css。 既不能改變css soure文件,路線有什麼問題嗎? (ns my-web.views.common (:use noir.core hiccup.core hiccup.page-helpers )) (defpartial layout [& content] (html5

    1熱度

    1回答

    我想向我的noir服務器發送一個post請求,但我有太多的參數,服務器只是響應413狀態碼。我想知道是否可以提高發布請求的字符數限制。我讀它可能與其他服務如What is the size limit of a post request?和Clojure/Ring: Using the ring jetty adapter, large requests give me a 413: FULL H

    0熱度

    2回答

    規則我有動態生成的形式,所以我試圖驗證他們這樣說: (defn valid? [media-id data] ;media-id it's just a number, data is the form input (let [fields (common/get-fields-to-show media-id)] ; list of strings (the field names)

    4熱度

    2回答

    我正在用Ring + Compojure + lib-noir嘗試Clojure Web開發,我無法弄清楚如何測試會話狀態。

    0熱度

    1回答

    我正在嘗試在webnoir中執行此操作。 這工作: (defpage [:post "/testurl] {:keys [name phone]} (html5 (str "name: " name) (str "phone: " phone))) 現在我想產生許多模塊defpages,每個人都有不同的字段列表。我想從函數中調用defpages。 defpage必

    0熱度

    1回答

    我使用黑色。 有: (defpage "/welcome" [] "Welcome to Noir!") 我做我做這兩個網址的工作原理: http://localhost:8080/welcome http://localhost:8080/welcome/ 謝謝!編輯: 這是完整的答案。 在server.clj,加起來(:use [ring.util.response :only [r

    2熱度

    2回答

    我在Clojure中搞亂了Noir網絡框架,並試圖生成一個隨機的網格。 這可能是很糟糕的代碼,但我正在學習! :d (def tiles [:stairs :stone :monster]) (defpage "/" [] (common/layout [:div {:class "level"} (repeatedly 10 [:div {:class "r

    3熱度

    1回答

    我有一個照片鏈接列表,並且想用clojure和noir生成img標籤。 在這裏,我得到的鏈接: (def photos (->> (get-in result ["photoset" "photo"]) (map #(str "http://farm"(get % "farm") ".staticflickr.com/"(get % "server")"/"(get % "id")"_"(ge