

from werkzeug.routing import (
  Map, Rule, Submount,
  EndpointPrefix, RuleTemplate,
)

def make_rules():
  return [
    EndpointPrefix('%app_name%/', [
      Rule('/', endpoint='index'),
    ]),
  ]

all_views = {
  '%app_name%/index': '%app_name%.views.index',
}


from kay.view_group import (
  ViewGroup, URL
)

view_groups = [
  ViewGroup(URL('/', endpoint='index', view='%app_name%.views.index'))
]

Use a new interface for urlmapping in application template.
Use a new interface for urlmapping in application template.

  
+ from kay.view_group import (
+   ViewGroup, URL
- 
- from werkzeug.routing import (
-   Map, Rule, Submount,
-   EndpointPrefix, RuleTemplate,
  )
  
+ view_groups = [
+   ViewGroup(URL('/', endpoint='index', view='%app_name%.views.index'))
+ ]
- def make_rules():
-   return [
-     EndpointPrefix('%app_name%/', [
-       Rule('/', endpoint='index'),
-     ]),
-   ]
  
- all_views = {
-   '%app_name%/index': '%app_name%.views.index',
- }
- 
Use a new interface for urlmapping in application template.
## Code Before:


from werkzeug.routing import (
  Map, Rule, Submount,
  EndpointPrefix, RuleTemplate,
)

def make_rules():
  return [
    EndpointPrefix('%app_name%/', [
      Rule('/', endpoint='index'),
    ]),
  ]

all_views = {
  '%app_name%/index': '%app_name%.views.index',
}

## Instruction:
Use a new interface for urlmapping in application template.
## Code After:

from kay.view_group import (
  ViewGroup, URL
)

view_groups = [
  ViewGroup(URL('/', endpoint='index', view='%app_name%.views.index'))
]
