from sympy import isprime from flask import Flask, render_template app = Flask(__name__) @app.route('/primes') @app.route('/primes/') def primes(max_number=10): numbers = range(1,int(max_number)+1) return render_template('colorful-primes.html', title='Primes', numbers=numbers, isprime=isprime) if __name__ == '__main__': app.run()