# Path: pttrack/urls.py
# def wrap_url(url, no_wrap=[], login_only=[], provider_only=[],
#              updated_provider_only=[]):
#     '''
#     Wrap URL in decorators as appropriate.
#     '''
#     if url.name in no_wrap:
#         # do not wrap at all, fully public
#         pass
# 
#     elif url.name in login_only:
#         url.callback = login_required(url.callback)
# 
#     elif url.name in provider_only:
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     elif url.name in updated_provider_only:
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     else:  # wrap in everything
#         url.callback = clintype_required(url.callback)
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     return url


from django.conf.urls import url
from pttrack.urls import wrap_url
from . import views
from __future__ import unicode_literals


unwrapped_urlconf = [
    url(r'^dispatch/$',
        views.dashboard_dispatch,
        name='dashboard-dispatch'),
    url(r'^attending/$',
        views.dashboard_attending,
        name='dashboard-attending'),
]


# Path: pttrack/urls.py
# def wrap_url(url, no_wrap=[], login_only=[], provider_only=[],
#              updated_provider_only=[]):
#     '''
#     Wrap URL in decorators as appropriate.
#     '''
#     if url.name in no_wrap:
#         # do not wrap at all, fully public
#         pass
# 
#     elif url.name in login_only:
#         url.callback = login_required(url.callback)
# 
#     elif url.name in provider_only:
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     elif url.name in updated_provider_only:
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     else:  # wrap in everything
#         url.callback = clintype_required(url.callback)
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     return url


# Path: dashboard/urls.py
from django.conf.urls import url
from pttrack.urls import wrap_url
from . import views

from __future__ import unicode_literals


unwrapped_urlconf = [
    url(r'^dispatch/$',
        views.dashboard_dispatch,
        name='dashboard-dispatch'),
    url(r'^attending/$',
        views.dashboard_attending,
        name='dashboard-attending'),
]


urlpatterns = [wrap_url(u, **{}) for u in unwrapped_urlconf]