routes.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env python3
  2. from flask import render_template, url_for
  3. from app import app
  4. @app.route("/")
  5. @app.route("/index")
  6. def index():
  7. usr = { "username":"clementine", "content" : "index" }
  8. return render_template( usr["content"] + '.html', title='home', user=usr)
  9. @app.route("/manage_card")
  10. def manage_card():
  11. usr = { "username":"clementine" }
  12. return render_template( 'manage_card.html', title='home', user=usr)
  13. @app.route("/manage_user")
  14. def manage_user():
  15. usr = { "username":"clementine" }
  16. return render_template( 'manage_user.html', title='home', user=usr)
  17. @app.route("/reissue_card")
  18. def reissue_card():
  19. usr = { "username":"clementine" }
  20. return render_template( 'reissue_card.html', title='home', user=usr)
  21. @app.route("/recycle_card")
  22. def recycle_card():
  23. usr = { "username":"clementine" }
  24. return render_template( 'recycle_card.html', title='home', user=usr)
  25. @app.route("/add_card_block")
  26. def add_card_block():
  27. usr = { "username":"clementine" }
  28. return render_template( 'add_card_block.html', title='home', user=usr)
  29. @app.route("/process_pending_card")
  30. def process_pending_card():
  31. usr = { "username":"clementine" }
  32. return render_template( 'process_pending_card.html', title='home', user=usr)
  33. @app.route("/search")
  34. def search():
  35. usr = { "username":"clementine" }
  36. return render_template( 'search.html', title='home', user=usr)
  37. @app.route("/help")
  38. def help():
  39. usr = { "username":"clementine" }
  40. return render_template( 'help.html', title='home', user=usr)