web: fix outdated api usage to support yesod 1.6 (#717)
This commit is contained in:
parent
97c814c8ba
commit
e368c99900
@ -150,11 +150,12 @@ instance Yesod App where
|
|||||||
staticRootUrl <- (staticRoot . settings) <$> getYesod
|
staticRootUrl <- (staticRoot . settings) <$> getYesod
|
||||||
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
||||||
|
|
||||||
|
-- TODO outdated, still needed ?
|
||||||
-- This is done to provide an optimization for serving static files from
|
-- This is done to provide an optimization for serving static files from
|
||||||
-- a separate domain. Please see the staticRoot setting in Settings.hs
|
-- a separate domain. Please see the staticRoot setting in Settings.hs
|
||||||
urlRenderOverride y (StaticR s) =
|
-- urlRenderOverride y (StaticR s) =
|
||||||
Just $ uncurry (joinPath y (Settings.staticRoot $ settings y)) $ renderRoute s
|
-- Just $ uncurry (joinPath y (Settings.staticRoot $ settings y)) $ renderRoute s
|
||||||
urlRenderOverride _ _ = Nothing
|
urlParamRenderOverride _ _ _ = Nothing
|
||||||
|
|
||||||
#ifndef DEVELOPMENT
|
#ifndef DEVELOPMENT
|
||||||
-- This function creates static content files in the static folder
|
-- This function creates static content files in the static folder
|
||||||
@ -167,11 +168,6 @@ instance Yesod App where
|
|||||||
-- Place Javascript at bottom of the body tag so the rest of the page loads first
|
-- Place Javascript at bottom of the body tag so the rest of the page loads first
|
||||||
jsLoader _ = BottomOfBody
|
jsLoader _ = BottomOfBody
|
||||||
|
|
||||||
-- What messages should be logged. The following includes all messages when
|
|
||||||
-- in development, and warnings and errors in production.
|
|
||||||
shouldLog _ _source level =
|
|
||||||
development || level == LevelWarn || level == LevelError
|
|
||||||
|
|
||||||
-- This instance is required to use forms. You can modify renderMessage to
|
-- This instance is required to use forms. You can modify renderMessage to
|
||||||
-- achieve customized and internationalized form validation messages.
|
-- achieve customized and internationalized form validation messages.
|
||||||
instance RenderMessage App FormMessage where
|
instance RenderMessage App FormMessage where
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user