1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-19 04:30:53 +00:00
Commit Graph

70 Commits

Author SHA1 Message Date
astaxie
ea513002c5 admin filter finish to all router include static file
so if your web is need auth or release the resoure you can writer the
finish filter
2013-11-15 21:51:36 +08:00
astaxie
097bcb3b5b Improve monitoring management module 2013-11-15 18:08:53 +08:00
astaxie
18335194bc fix runrouter is nil 2013-11-13 21:37:17 +08:00
astaxie
6c13bdde25 support profile & statistics in another port 2013-11-13 21:11:09 +08:00
astaxie
2f75445520 when runmode is dev it will show warning ingo
if have a attack url, the info is
2013-11-10 23:42:07 +08:00
astaxie
43057a2fcb fix #284 2013-11-10 23:26:28 +08:00
astaxie
9446563e5b add util func to get the url fix #282
UrlFor(endpoint string, values ...string) string
2013-11-10 23:05:07 +08:00
astaxie
2a81595c3e fix #280 2013-11-08 17:23:56 +08:00
astaxie
9e4d886a6c filter http method fix #279 2013-11-07 22:10:54 +08:00
astaxie
3ac5eec301 fix #253 2013-10-28 22:38:50 +08:00
astaxie
35a136bcee fix #232 2013-09-29 15:38:28 +08:00
astaxie
aaf1490ff5 fix router 2013-09-28 23:37:05 +08:00
astaxie
a62ed10ab3 add supoort AppController
http://play.golang.org/p/MZptHZeYUx
2013-09-28 23:30:36 +08:00
astaxie
8a37c30f35 fix #226 2013-09-28 21:45:52 +08:00
astaxie
797bd98269 fix #210 2013-09-22 14:32:18 +08:00
astaxie
4a3d32dc1f support auto get session from input fix #211 2013-09-22 11:43:22 +08:00
astaxie
048be29fcd add w.started fix #208 2013-09-22 11:17:18 +08:00
astaxie
4ce584c5a6 fix #201 2013-09-22 11:12:37 +08:00
astaxie
9d84969bf6 fix #153
已经支持了任意定义变量的路由形式,具体的使用请参考:

func TestManyRoute(t *testing.T) {

	r, _ := http.NewRequest("GET", "/beego32-12.html", nil)
	w := httptest.NewRecorder()

	handler := NewControllerRegistor()
	handler.Add("/beego:id([0-9]+)-:page([0-9]+).html", &TestController{})
	handler.ServeHTTP(w, r)

	id := r.URL.Query().Get(":id")
	page := r.URL.Query().Get(":page")

	if id != "32" {
		t.Errorf("url param set to [%s]; want [%s]", id, "32")
	}
	if page != "12" {
		t.Errorf("url param set to [%s]; want [%s]", page, "12")
	}
}
2013-09-13 11:22:14 +08:00
astaxie
9f6b803a10 update middleware & beego's error 2013-09-11 17:00:39 +08:00
astaxie
e7f08946d1 improve the performance 2013-09-11 15:16:09 +08:00
astaxie
a88750d2b3 support websocket 2013-09-10 17:56:06 +08:00
astaxie
bd61dd9ffc change a log about new version 2013-09-10 00:00:18 +08:00
astaxie
50f3bd5835 add filter after 2013-08-12 00:14:42 +08:00
astaxie
1f3ae3d682 Improve performance 2013-08-11 23:27:53 +08:00
astaxie
bbef213155 fix #144 2013-08-10 21:44:27 +08:00
astaxie
f9a31ea00a EnableXSRF 2013-08-06 23:21:52 +08:00
astaxie
fd3c8834da autorouter when /admin 301 to /admin/ 2013-08-04 23:13:29 +08:00
astaxie
3d481178d7 improve router 2013-08-04 23:06:48 +08:00
astaxie
a997ca746f fix router's /path/ 2013-07-30 22:38:01 +08:00
astaxie
572e281566 fix router's bug 2013-07-30 22:33:36 +08:00
astaxie
8674b81b3a fix router & tpl tolower 2013-07-30 22:17:16 +08:00
astaxie
0e748c6871 parse url to params
/object/login/2009/07/11
parse to ObjectController  Login function
params:map[0:2009 1:07 2:11]
2013-07-27 10:55:10 +08:00
astaxie
f7e7fab6f2 support autorouter 2013-07-27 10:25:14 +08:00
astaxie
ab08aa9c9e MethodByName 2013-07-25 16:08:18 +08:00
astaxie
7c610ee7c9 fix reflect find methodByName 2013-07-25 16:00:42 +08:00
astaxie
e88c2be013 update docs & update beego's version 2013-07-25 15:37:38 +08:00
astaxie
d5ddd0a9dd support user define function
+//Add("/user",&UserController{})
+//Add("/api/list",&RestController{},"*:ListFood")
+//Add("/api/create",&RestController{},"post:CreateFood")
+//Add("/api/update",&RestController{},"put:UpdateFood")
+//Add("/api/delete",&RestController{},"delete:DeleteFood")
+//Add("/api",&RestController{},"get,post:ApiFunc")
+//Add("/simple",&SimpleController{},"get:GetFunc;post:PostFunc")
2013-07-25 15:17:09 +08:00
Unknown
7f5dd13422 Fixed bug: error page cannot show correct corresponding status code 2013-07-18 14:42:45 +08:00
astaxie
7bfb4126d7 support copy requestbody 2013-07-08 23:12:31 +08:00
astaxie
ee9223b1b9 fix #18
func (this *MainController) Get() {
this.GoToFunc("Test")
}

func (this *MainController) Test() {
this.Ctx.WriteString("testtest")
}
2013-07-08 17:35:09 +08:00
astaxie
11977f4f77 fix #90 2013-07-07 17:58:50 +08:00
astaxie
461eac46b9 fix #89 2013-07-07 17:45:39 +08:00
astaxie
75af664511 change r.ParseMultipartForm position 2013-07-04 23:41:35 +08:00
astaxie
9e41d93184 delete strcut map
I think if user should set field in controller, there's no need to have
thie feature
2013-06-25 16:44:53 +08:00
astaxie
512ddf8a70 fix small bug for not return 2013-06-24 23:56:53 +08:00
astaxie
c5a23d5cde fix #81 2013-06-24 23:24:33 +08:00
astaxie
3475685233 add Server info 2013-06-20 15:49:43 +08:00
Lunny Xiao
f20ad0916f bug fix 2013-06-04 19:45:48 +08:00
Lunny Xiao
65041aae71 remove nonuse parseForm and change the StructMap's params 2013-05-31 14:07:06 +08:00