generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
49 lines (43 loc) · 1.57 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from app.categories.family import bp
from app.categories.results.views import NextStepsPage, CannotFindYourProblemPage
from app.categories.views import CategoryLandingPage
from app.categories.constants import FAMILY
class FamilyLandingPage(CategoryLandingPage):
question_title = FAMILY.title
category = FAMILY
routing_map = {
"main": [
(FAMILY.sub.social_services, "contact.contact_us"),
(FAMILY.sub.divorce, "contact.contact_us"),
(
FAMILY.sub.domestic_abuse,
"categories.domestic_abuse.are_you_at_risk_of_harm",
),
(FAMILY.sub.family_mediation, "categories.results.in_scope"),
(FAMILY.sub.child_abducted, "contact.contact_us"),
],
"more": [
(FAMILY.sub.send, "categories.send.landing"),
(FAMILY.sub.education, "categories.results.in_scope"),
(
FAMILY.sub.forced_marriage,
"categories.domestic_abuse.are_you_at_risk_of_harm",
),
],
"other": "categories.family.cannot_find_your_problem",
}
FamilyLandingPage.register_routes(bp, path="children-families-relationships")
bp.add_url_rule(
"/children-families-relationships/cannot-find-your-problem",
view_func=CannotFindYourProblemPage.as_view(
"cannot_find_your_problem",
next_steps_page="categories.family.next_steps",
),
)
bp.add_url_rule(
"/children-families-relationships/next-steps",
view_func=NextStepsPage.as_view(
"next_steps",
category=FAMILY,
),
)