I set, routes_apps_raw=['init']

and modified controllers to use request.raw_args
Now my controllers are working fine.

But it caused two new problems :related to download and login

*1)* def download():
       return response.download(request,db)
   
    since above will not work when routes_apps_raw is set, I modified it to

def download():
    import os, time
    filename = 
os.path.join(request.folder,'uploads',request.raw_args.split('/')[0])
    return response.stream(open(filename,'rb'))

Now it displays images in webpage, but I've a option to download picture.
using default download method, it used to open a file save dialog but, now 
it displays picture in browser (in encoded form, hence 'garbage' )

*what  should I add to my custom download function to work properly.*
*
*
*2)* Login form is not working anymore.
   Browser reports 'too many redirects' when I try to access login or 
registration forms and such.

*what went wrong? How to fix it?*

Reply via email to