コンテンツへスキップ
メニュー
この質問にフラグが付けられました

Hi, everbody,

I understand, all what i put in my "static" path, the file is freely available throught http://?????/module_name/static/file.txt

But, i need Block some files with the simplicity of put them in a local folder and have available __only__ if I ame logged.

With Controllers and complete or partial path doesn't work.


class Controller(odoo.http.Controller): 
    @route('/module_name/static/pdf/file.pdf', auth='user')  # Isn't Work
    @route('/module_name/static/pdf', auth='user')              # Work when i'm accessing http://url/module_name/static/pdf
    def handler(self):
        pass


Thanks.


アバター
破棄
関連投稿 返信 ビュー 活動
1
6月 23
3064
1
11月 20
6384
0
8月 20
3809
2
12月 19
3811
1
3月 18
6678