1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 12:27:02 +00:00

Update to version 8.5.4 | Read HISTORY.md

https://github.com/kataras/iris/blob/master/HISTORY.md#th-26-october-2017--v854

Former-commit-id: 43a3b46b99085e0e0ed47b281e2f61dbb1ac6eb6
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-10-26 02:48:16 +03:00
parent 3c5f729f40
commit 4a63488948
18 changed files with 246 additions and 630 deletions

View File

@@ -88,9 +88,9 @@ func profileByUsername(ctx iris.Context) {
// .Params are used to get dynamic path parameters.
username := ctx.Params().Get("username")
ctx.ViewData("Username", username)
// renders "./views/users/profile.html"
// renders "./views/user/profile.html"
// with {{ .Username }} equals to the username dynamic path parameter.
ctx.View("users/profile.html")
ctx.View("user/profile.html")
}
func getUserByID(ctx iris.Context) {
@@ -109,8 +109,8 @@ func createUser(ctx iris.Context) {
ctx.StatusCode(iris.StatusInternalServerError)
return
}
// renders "./views/users/create_verification.html"
// renders "./views/user/create_verification.html"
// with {{ . }} equals to the User object, i.e {{ .Username }} , {{ .Firstname}} etc...
ctx.ViewData("", user)
ctx.View("users/create_verification.html")
ctx.View("user/create_verification.html")
}