Пример #1
0
def admin_urls(admin_site=None):
    """
    URLs for views with the `admin_view` decorator of a custom or the
    default admin-site.
    """
    from django.conf.urls import patterns, url
    from reporting.views import ReportListView, ReportView, ReportExportView

    if not admin_site:
        from django.contrib.admin import site as admin_site

    urlpatterns = patterns('',
        url('^$', admin_site.admin_view(ReportListView.as_view()),
            name='reporting-list'),
        url('^(?P<slug>[\w-]+)/$', admin_site.admin_view(ReportView.as_view()),
            name='reporting-view'),
        url('^(?P<slug>[\w-]+)/export/(?P<format>[\w-]+)/$',
            admin_site.admin_view(ReportExportView.as_view()),
            name='reporting-export'),
    )

    return urlpatterns
Пример #2
0
from django.contrib.admin import site
from django.urls import path

from datahub.admin_report.views import download_report, list_reports

app_name = 'admin_report'

urlpatterns = [
    path(
        'admin/reports/',
        site.admin_view(list_reports),
        name='index',
    ),
    path(
        'admin/reports/<report_id>/download',
        site.admin_view(download_report),
        name='download-report',
    ),
]
Пример #3
0
from django.contrib.admin import site
from django.urls import path

from datahub.oauth.admin.views import add_access_token_view

app_name = 'admin-oauth'

urlpatterns = [
    path(
        'admin/add-access-token/',
        site.admin_view(add_access_token_view),
        name='add-access-token',
    ),
]
Пример #4
0
# -*- coding: utf-8 -*-
# pylint: disable=E1120
from django.conf.urls import patterns, url
from django.contrib.admin import site
from syncmedia.views import SyncKeys, SyncMediaView

urlpatterns = patterns(
    '',
    url(r'^sync-command',
        site.admin_view(SyncMediaView.as_view()),
        name="sync_media"),
    url(r'^', SyncKeys.as_view(), name="sync"),
)
Пример #5
0
from django.conf.urls import url
from django.contrib.admin import site

from .views import ElectionPreview, ElectionView, ElectionDocsView

ElectionPreviewView = site.admin_view(ElectionPreview.as_view())
ElectionDocsView = site.admin_view(ElectionDocsView.as_view())


urlpatterns = [
    url(r'^$', ElectionView.as_view(), name='index'),
    url(r'^preview/(?P<pk>\d+)/$', ElectionPreviewView, name='preview'),
    url(r'^preview/(?P<pk>\d+)/(?P<type>[up]g)/$', ElectionPreviewView, name='preview'),
    url(r'doc/$', ElectionDocsView, name='docs'),
]
Пример #6
0
 def wrapper(*args, **kwargs):
     return site.admin_view(view, cacheable)(*args, **kwargs)
Пример #7
0
from django.contrib.admin import site
from django.contrib import admin
#from tastypie.api import Api
from track.views import *
from api import *

#admin.autodiscover()

#v1_api = Api(api_name='v1')
#v1_api.register(IssueResource())
#v1_api.register(TareaResource())
#v1_api.register(PizarronResource())
#v1_api.register(UserResource())

urlpatterns = [
    url(r'^$', RedirectView.as_view(url='/admin')),
    #url(r'^api/', include(v1_api.urls)),
    url(r'^admin/resume/$', site.admin_view(resume)),
    url(r'^admin/gantt/$', site.admin_view(gantt_all)),
    url(r'^admin/view/(?P<intoken>[a-f0-9]+)/(?P<v>\w+)/$', view_xml),
    url(r'^admin/json/board/$', site.admin_view(json_board)),
    url(r'^admin/auth/profile/$', site.admin_view(user_profile), name='user_profile'),
    url(r'^admin/track/proyecto/(?P<proyecto_id>\d+)/gantt/$', site.admin_view(gantt_por_proyecto)),
    url(r'^admin/track/user/(?P<user_id>\d+)/gantt/$', site.admin_view(gantt_por_usuario)),
    url(r'^admin/track/user/(?P<user_id>\d+)/proyecto/(?P<proyecto_id>\d+)/gantt/$', site.admin_view(gantt_por_usuario_proyecto)),
    url(r'^admin/track/tarea/(?P<tarea_id>\d+)/board/(?P<status_id>\d+)/$', site.admin_view(board)),
    url(r'^admin/track/tarea/(?P<tarea_id>\d+)/change/board/(?P<status_id>\d+)/$', site.admin_view(board)),
    url(r'^jet/', include('jet.urls', 'jet')),
    url(r'^admin/', admin.site.urls),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Пример #8
0
# -*- coding: utf-8 -*-
# pylint: disable=E1120
from django.conf.urls import patterns, url
from django.contrib.admin import site
from syncmedia.views import SyncKeys, SyncMediaView

urlpatterns = patterns(
    '',
    url(r'^sync-command', site.admin_view(SyncMediaView.as_view()), name="sync_media"),
    url(r'^', SyncKeys.as_view(), name="sync"),
)
Пример #9
0
from tastypie.api import Api
from track.views import *
from api import *

admin.autodiscover()

v1_api = Api(api_name='v1')
v1_api.register(IssueResource())
v1_api.register(TareaResource())
v1_api.register(PizarronResource())
v1_api.register(UserResource())

urlpatterns = patterns(
    '',
    url(r'^$', RedirectView.as_view(url='/admin')),
    url(r'^api/', include(v1_api.urls)),
    url(r'^admin/gantt/$', site.admin_view(gantt_all)),
    url(r'^admin/json/board/$', site.admin_view(json_board)),
    url(r'^admin/auth/profile/$', site.admin_view(user_profile)),
    url(r'^admin/track/proyecto/(?P<proyecto_id>\d+)/gantt/$',
        site.admin_view(gantt_por_proyecto)),
    url(r'^admin/track/user/(?P<user_id>\d+)/gantt/$',
        site.admin_view(gantt_por_usuario)),
    url(
        r'^admin/track/user/(?P<user_id>\d+)/proyecto/(?P<proyecto_id>\d+)/gantt/$',
        site.admin_view(gantt_por_usuario_proyecto)),
    url(r'^admin/track/tarea/(?P<tarea_id>\d+)/board/(?P<status_id>\d+)/$',
        site.admin_view(board)),
    url(r'^admin/', include(admin.site.urls)),
)
Пример #10
0
 def wrapper(*args, **kwargs):
     return admin_site.admin_view(view, cacheable)(*args, **kwargs)
Пример #11
0
"""Investment project report view URL config."""
from django.contrib.admin import site
from django.urls import path

from datahub.investment.report.views import download_spi_report

app_name = 'investment-report'

urlpatterns = [
    path(
        'admin/investment-report/spi/<uuid:pk>',
        site.admin_view(download_spi_report),
        name='download-spi-report',
    ),
]