error_pages.py 406 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from jimvc import app
  4. from . import render
  5. __author__ = 'James Iter'
  6. __date__ = '2017/9/10'
  7. __contact__ = 'james.iter.cn@gmail.com'
  8. __copyright__ = '(c) 2017 by James Iter.'
  9. @app.errorhandler(404)
  10. def page_not_found(error):
  11. return render('404.html'), 404
  12. # @app.errorhandler(500)
  13. # def page_not_found(error):
  14. # return render('500.html'), 500