Editing Files With Flask-Admin -


i using flask-admin provide admin interface web app, , far has gone well. however, trying make .txt files can edited right in browser.

reading docs, have incorporated line:

editable_extensions = ('txt') 

into fileadmin class. however, every time check box beside file , press selected -> edit, "permission denied" error. on contrary, rename feature works fine, , can click file name view contents.

does have idea how solve problem, or should start looking?

note may missing required code, line above have done regards editing functionality.

edit: have managed get:

unexpected error while reading filename.txt  file cannot edited now. 

never mind, fixed in update. curious issue was, edit() function in fileadmin.py opening file 'r', rather 'rb'. caused error:

'str' object has no attribute 'decode' 

which consequently produced in error in end.