Contact me to be added to this repository. Push the creations you make for D&D, and they will be displayed in a nice website. See the website for how to contribute.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
836 B

4 years ago
  1. from flask import Flask
  2. from flask import render_template
  3. from flask import request
  4. from items import get_items
  5. app = Flask(__name__)
  6. @app.route('/style.css')
  7. def style():
  8. return render_template('style.css')
  9. @app.route('/')
  10. def index():
  11. return render_template('index.html')
  12. @app.route('/items')
  13. def items():
  14. return render_template('items.html',title="Items",items=get_items("../Items/*"))
  15. @app.route('/places')
  16. def places():
  17. return render_template('items.html',title="Places",items=get_items("../Places/*"))
  18. @app.route('/characters')
  19. def characters():
  20. return render_template('items.html',title="Characters",items=get_items("../Characters/*"))
  21. @app.route('/spells')
  22. def spells():
  23. return render_template('items.html',title="spells",items=get_items("../Spells/*"))
  24. if __name__ == "__main__":
  25. app.run()