mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Extract user profile route into its own file
This commit is contained in:
@@ -4,5 +4,6 @@ main = Blueprint('main', __name__)
|
|||||||
|
|
||||||
from app.main.views import (
|
from app.main.views import (
|
||||||
index, sign_in, sign_out, register, two_factor, verify, sms, add_service,
|
index, sign_in, sign_out, register, two_factor, verify, sms, add_service,
|
||||||
code_not_received, jobs, dashboard, templates, service_settings, forgot_password, new_password, styleguide
|
code_not_received, jobs, dashboard, templates, service_settings, forgot_password,
|
||||||
|
new_password, styleguide, user_profile
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,12 +32,6 @@ def checkemail():
|
|||||||
return render_template('views/check-email.html')
|
return render_template('views/check-email.html')
|
||||||
|
|
||||||
|
|
||||||
@main.route("/user-profile")
|
|
||||||
@login_required
|
|
||||||
def userprofile():
|
|
||||||
return render_template('views/user-profile.html')
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/manage-users")
|
@main.route("/manage-users")
|
||||||
@login_required
|
@login_required
|
||||||
def manageusers():
|
def manageusers():
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from flask import render_template
|
||||||
|
from app.main import main
|
||||||
|
|
||||||
|
|
||||||
|
@main.route("/user-profile")
|
||||||
|
def userprofile():
|
||||||
|
return render_template('views/user-profile.html')
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
def test_should_show_overview_page(notifications_admin):
|
||||||
|
response = notifications_admin.test_client().get('/user-profile')
|
||||||
|
|
||||||
|
assert response.status_code == 200
|
||||||
Reference in New Issue
Block a user