Finalize translation fixes for 13.3.md

This commit is contained in:
Anchor
2015-01-26 21:22:32 -08:00
parent f4d7cd95f6
commit 78cfc3b85b

View File

@@ -125,7 +125,7 @@ Above, the controller base class already implements the functions defined in the
## Application guide
Above beego Framework base class to complete the design of the controller, then we in our application can be to design our approach:
Above, we've just finished discussing Beego's implementation of the base controller class. We can now use this information to design our request handling, inheriting from the base class and implementing the necessary methods in our own controller.
package controllers
@@ -143,11 +143,11 @@ Above beego Framework base class to complete the design of the controller, then
this.TplNames = "index.tpl"
}
The way we achieved above subclass MainController, implements Get method, so if the user through other means(POST/HEAD, etc. ) to access the resource will return 403, and if it is Get access, because we set the AutoRender = true, then play in the implementation of the Get method is performed automatically after the Render function, it will display the following interface:
In the code above, we've implemented a subclass of `Controller` called `MainController` which only implements the `Get()` method. If a user tries to access the resource using any of the other HTTP methods (POST, HEAD, etc), a 403 Forbidden will be returned. However, if a user submits a GET request to the resource and we have have the `AutoRender` variable set to `true`, the resource's controller will automatically call its `Render()` function, rendering the corresponding template and responding with the following:
![](images/13.4.beego.png?raw=true)
index.tpl code is shown below, we can see the data set and display are quite simple:
The `index.tpl` code can be seen below; as you can see, parsing model data into a template is quite simple:
<!DOCTYPE html>
<html>
@@ -163,5 +163,5 @@ index.tpl code is shown below, we can see the data set and display are quite sim
## Links
- [Directory](preface.md)
- Previous section: [Customized routers](13.2.md)
- Previous section: [Customizing routers](13.2.md)
- Next section: [Logs and configurations](13.4.md)