Test add service completed.

This commit is contained in:
Nicholas Staples
2016-01-15 16:10:24 +00:00
parent 3b1d521c10
commit 262bbbac45
6 changed files with 55 additions and 26 deletions

View File

@@ -1,18 +1,24 @@
from flask import render_template
from flask import (abort, render_template)
from flask_login import login_required
from app.main import main
from app.main.dao.services_dao import get_service_by_id
from client.errors import HTTPError
from ._jobs import jobs
@main.route("/services/<int:service_id>/dashboard")
@login_required
def dashboard(service_id):
try:
service = get_service_by_id(service_id)
except HTTPError as e:
if e.status_code == 404:
abort(404)
else:
raise e
return render_template(
'views/dashboard.html',
jobs=jobs,
free_text_messages_remaining=560,
spent_this_month='0.00',
service_id=service_id
)
service_id=service_id)