Advertisement
sriyanto

template awal python

Jan 10th, 2022 (edited)
742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. from flask import Flask, render_template, url_for
  2.  
  3. application = Flask(__name__)
  4.  
  5. @application.route('/')
  6. def index():
  7.     return render_template('home.html')
  8.  
  9. @application.route('/kontak-saya')
  10. def kontakSaya():
  11.     return render_template('kontak-saya.html')
  12.  
  13. @application.route('/tentang-saya')
  14. def tentangSaya():
  15.     return render_template('tentang-saya.html')
  16.  
  17. if __name__ == '__main__':
  18.     application.run('0.0.0.0',8080)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement