Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
ab38c2f8
Commit
ab38c2f8
authored
Apr 20, 2013
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EnableGzip support & delete if views not exist
parent
2ad44786
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Quickstart.md
docs/zh/Quickstart.md
+4
-0
template.go
template.go
+1
-1
No files found.
docs/zh/Quickstart.md
View file @
ab38c2f8
...
...
@@ -891,6 +891,10 @@ beego中带有很多可配置的参数,我们来一一认识一下它们,这
*
MaxMemory
文件上传默认内存缓存大小,默认值是
`1 << 26`
(64M)
*
EnableGzip
是否开启gzip支持,默认为false不支持gzip,一旦开启了gzip,那么在模板输出的内容会进行gzip或者zlib压缩,根据用户的Accept-Encoding来判断。
## 第三方应用集成
beego支持第三方应用的集成,用户可以自定义
`http.Handler`
,用户可以通过如下方式进行注册路由:
...
...
template.go
View file @
ab38c2f8
...
...
@@ -94,7 +94,7 @@ func AddTemplateExt(ext string) {
func
BuildTemplate
(
dir
string
)
error
{
if
_
,
err
:=
os
.
Stat
(
dir
);
err
!=
nil
{
if
os
.
IsNotExist
(
err
)
{
return
err
return
nil
}
else
{
return
errors
.
New
(
"dir open err"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment