from project import app from project.controllers import * app.route('/', 'GET', welcome.index) app.route('/signin', 'GET', welcome.signin) app.route('/signin', 'POST', welcome.signup) app.route('/login', 'GET', login.index) app.route('/login', 'POST', login.login) app.route('/logout', 'GET', login.logout) # static files app.route('/:file#(favicon.ico|humans.txt)#', 'GET', static.favicon) app.route('/:path#(images|css|js|fonts)\/.+#', 'GET', static.server_static)
index, result, static_serving, media_serving, get_status ) from .project.slides.core import slide2img from .project import celery except SystemError: from project.views import ( index, result, static_serving, media_serving, get_status, redirect_real_path, ) from project.slides.core import slide2img from project import celery if __name__ == "__main__": app.route('/', methods=['GET', 'POST'])(index) app.route('/state/')(result) app.route('/api/state/')(get_status) app.route('/api/serve/<string:_hash>')(redirect_real_path) app.route('/static/<path:filename>')(static_serving) app.route('/media/<path:filename>')(media_serving) admin = Admin(app, name='slideshare-downloader', template_mode='bootstrap3') admin.add_view(ModelView(User, db.session)) admin.add_view(ModelView(Slide, db.session)) manager.run()
from project import app from project.controllers import * app.route('/', 'GET', printer.index) app.route('/print', ['GET', 'POST'], printer.printer) # static files app.route('/:file#(favicon.ico|humans.txt)#', 'GET', static.favicon) app.route('/:path#(images|css|js|fonts)\/.+#', 'GET', static.server_static)