summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/hybridapp/configure.zcml
blob: 56c6ea8db6cc015e6d7184117660e6f116e1a8e1 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
<configure xmlns="http://namespaces.repoze.org/bfg">

  <include package="repoze.bfg.includes" />

  <!-- we want this view to "win" -->
  <route
     view=".views.route_view"
     path="abc"
     name="route" />

  <!-- .. even though this one has a more specific context -->
  <view
     view=".views.global_view"
     context="repoze.bfg.traversal.DefaultRootFactory"
     />

  <view
    name="global2"
    view=".views.global2_view"
    context="repoze.bfg.traversal.DefaultRootFactory"
    />

  <route
     path="def"
     name="route2"
     />

  <!-- we want this view to win for route2 even though global view with 
       context is more specific -->
  <view
     route_name="route2"
     view=".views.route2_view"
     />

  <!-- the global view should be found for this route -->
  <route
     path="ghi"
     name="route3"
     use_global_views="True"
     />

  <!-- the global view should not be found for this route -->
  <route
     path="jkl"
     name="route4"
     />

  <!-- the global view should not be found for this route (/global2) -->
  <route
     path="mno/*traverse"
     name="route5"
     />

  <!-- the global view should be found for this route (/global2) -->
  <route
     path="pqr/*traverse"
     name="route6"
     use_global_views="True"
     />

</configure>