Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4630 Vizualizări

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.


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 23
3061
1
nov. 20
6382
0
aug. 20
3808
2
dec. 19
3808
1
mar. 18
6677