from django.shortcuts import render

from Presentation.forms import FlightCheckForm
from Presentation.watcherService import WatcherService


def index(request):
    """ Index page for the app """

    form_class = FlightCheckForm
    
    return render(request, 'presentation/index.html', {
        'form': form_class,
    })


def results(request, flight_number=None, twitter_handle=None):
    """ Captures main form results and displays """

    if request.GET['flight_number'] != '':
        flight_number = request.GET['flight_number']

    if request.GET['twitter_handle'] != '':
        twitter_handle = request.GET['twitter_handle']

    details = WatcherService.watch(twitter_handel=twitter_handle, flight_number=flight_number)

    return render(request, 'presentation/results.html', {
        'vm': details,
    })

a4f7baa3d2c31d1be5d6c0c7cfc8c059af9d610d
<mask token>

<mask token>


def results(request, flight_number=None, twitter_handle=None):
    """ Captures main form results and displays """
    if request.GET['flight_number'] != '':
        flight_number = request.GET['flight_number']
    if request.GET['twitter_handle'] != '':
        twitter_handle = request.GET['twitter_handle']
    details = WatcherService.watch(twitter_handel=twitter_handle,
        flight_number=flight_number)
    return render(request, 'presentation/results.html', {'vm': details})

<mask token>


def index(request):
    """ Index page for the app """
    form_class = FlightCheckForm
    return render(request, 'presentation/index.html', {'form': form_class})


def results(request, flight_number=None, twitter_handle=None):
    """ Captures main form results and displays """
    if request.GET['flight_number'] != '':
        flight_number = request.GET['flight_number']
    if request.GET['twitter_handle'] != '':
        twitter_handle = request.GET['twitter_handle']
    details = WatcherService.watch(twitter_handel=twitter_handle,
        flight_number=flight_number)
    return render(request, 'presentation/results.html', {'vm': details})

from django.shortcuts import render
from Presentation.forms import FlightCheckForm
from Presentation.watcherService import WatcherService


def index(request):
    """ Index page for the app """
    form_class = FlightCheckForm
    return render(request, 'presentation/index.html', {'form': form_class})


def results(request, flight_number=None, twitter_handle=None):
    """ Captures main form results and displays """
    if request.GET['flight_number'] != '':
        flight_number = request.GET['flight_number']
    if request.GET['twitter_handle'] != '':
        twitter_handle = request.GET['twitter_handle']
    details = WatcherService.watch(twitter_handel=twitter_handle,
        flight_number=flight_number)
    return render(request, 'presentation/results.html', {'vm': details})

from django.shortcuts import render

from Presentation.forms import FlightCheckForm
from Presentation.watcherService import WatcherService


def index(request):
    """ Index page for the app """

    form_class = FlightCheckForm
    
    return render(request, 'presentation/index.html', {
        'form': form_class,
    })


def results(request, flight_number=None, twitter_handle=None):
    """ Captures main form results and displays """

    if request.GET['flight_number'] != '':
        flight_number = request.GET['flight_number']

    if request.GET['twitter_handle'] != '':
        twitter_handle = request.GET['twitter_handle']

    details = WatcherService.watch(twitter_handel=twitter_handle, flight_number=flight_number)

    return render(request, 'presentation/results.html', {
        'vm': details,
    })
