
"""Define URLs and handlers to server them."""

from tornado.web import url
from handlers import (
    DefConfHandler,
    JobHandler,
    SubscriptionHandler
)

APP_URLS = [
    url(r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler, name='defconf'),
    url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job'),
    url(r'/api/subscription', SubscriptionHandler, name='subscription')
]


"""Define URLs and handlers to server them."""

from tornado.web import url
from handlers import (
    DefConfHandler,
    JobHandler,
    SubscriptionHandler
)

APP_URLS = [
    url(r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler, name='defconf'),
    url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job'),
    url(
        r'/api/subscription(?P<sl>/)?(?P<id>.*)',
        SubscriptionHandler,
        name='subscription'
    )
]

Add ID support for subscription/ URLs.
Add ID support for subscription/ URLs.

  
  """Define URLs and handlers to server them."""
  
  from tornado.web import url
  from handlers import (
      DefConfHandler,
      JobHandler,
      SubscriptionHandler
  )
  
  APP_URLS = [
      url(r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler, name='defconf'),
      url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job'),
-     url(r'/api/subscription', SubscriptionHandler, name='subscription')
+     url(
+         r'/api/subscription(?P<sl>/)?(?P<id>.*)',
+         SubscriptionHandler,
+         name='subscription'
+     )
  ]
  
Add ID support for subscription/ URLs.
## Code Before:

"""Define URLs and handlers to server them."""

from tornado.web import url
from handlers import (
    DefConfHandler,
    JobHandler,
    SubscriptionHandler
)

APP_URLS = [
    url(r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler, name='defconf'),
    url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job'),
    url(r'/api/subscription', SubscriptionHandler, name='subscription')
]

## Instruction:
Add ID support for subscription/ URLs.
## Code After:

"""Define URLs and handlers to server them."""

from tornado.web import url
from handlers import (
    DefConfHandler,
    JobHandler,
    SubscriptionHandler
)

APP_URLS = [
    url(r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler, name='defconf'),
    url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job'),
    url(
        r'/api/subscription(?P<sl>/)?(?P<id>.*)',
        SubscriptionHandler,
        name='subscription'
    )
]
