Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3289 Lượt xem

Hello,


I'm trying to edit the main.py controller file to make some sites available only after the user login.


For example, i have two sites:


www.mysite.com/site1

www.mysite.com/site2


I want to be able to view site1 without login and site2 private, only after the user logged in.


In the main.py i'm trying to add a new method:


@http.route('/site2',type='http',auth='user',website=True)

    def site2(self,**kw):

    // i don't know what put here


Someone can help me with the information i have to put to get what i want?


Thanks for your help

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 5 25
6734
2
thg 1 25
2450
4
thg 1 25
4654
0
thg 11 24
1881
1
thg 11 24
2693