<filename>app/views.py
from flask import render_template
from app import app
from .request import get_sources, get_articles 

# Views
@app.route('/')
def index():

    '''
    View root page function that returns the index page and its data
    '''
    title = 'Home - Welcome to The best Online News Website'
    return render_template('index.html', title = title)

@app.route('/news/<news_id>')
def news(news_id):

    '''
    View news page function that returns the news details page and its data
    '''
    return render_template('news.html',id = news_id)    
<filename>app/views.py
from flask import render_template
from app import app
from .request import get_sources, get_articles 

# Views
@app.route('/')
def index():

    '''
    View root page function that returns the index page and its data
    '''
    title = 'Home - Welcome to The best Online News Website'
    return render_template('index.html', title = title)

@app.route('/news/<news_id>')
def news(news_id):

    '''
    View news page function that returns the news details page and its data
    '''
    return render_template('news.html',id = news_id)    
# Views View root page function that returns the index page and its data View news page function that returns the news details page and its data