Review: Needs Fixing
57 + file_types = {'.html': 'text/html',
58 + '.css': 'text/css',
59 + '.js': 'application/javascript',
60 + '.jpg': 'image/jpeg',
61 + '.gif': 'image/gif',
62 + '.ico': 'image/x-icon',
63 + '.png': 'image/png'
64 + }
Rather than redeclaring this every time the function is called, add a constant
at the top of the module.
132 + ['c:\\test\\test.html', 'text/html']]
Why is there a Windows file name in here? This path is ridiculous on anything
other than Windows. No paths in the OpenLP codebase should be operating system
specific.
--
https://code.launchpad.net/~felipe-q/openlp/fix_httprouter/+merge/194569
Your team OpenLP Core is subscribed to branch lp:openlp.
_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help : https://help.launchpad.net/ListHelp