Ejemplo n.º 1
0
if os.environ.get('SAMPLE_APP', False):
    urlpatterns += [
        url(
            r'^controller/',
            include(
                (get_controller_urls(config_views), 'controller'),
                namespace='controller',
            ),
        ),
        url(
            r'',
            include(('openwisp_controller.config.urls', 'config'),
                    namespace='config'),
        ),
        url(r'^geo/', include((get_geo_urls(geo_views), 'geo'),
                              namespace='geo')),
    ]

urlpatterns += [
    url(r'^$', redirect_view, name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'', include('openwisp_controller.urls')),
]

urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
    import debug_toolbar
Ejemplo n.º 2
0
urlpatterns = []

if os.environ.get('SAMPLE_APP', False):
    urlpatterns += [
        url(
            r'^controller/',
            include(
                (get_controller_urls(config_views), 'controller'),
                namespace='controller',
            ),
        ),
        url(
            r'',
            include(('openwisp_controller.config.urls', 'config'), namespace='config'),
        ),
        url(r'^geo/', include((get_geo_urls(geo_views), 'geo'), namespace='geo')),
    ]

urlpatterns += [
    url(r'^$', redirect_view, name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'', include('openwisp_controller.urls')),
    path('accounts/', include('openwisp_users.accounts.urls')),
]

urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
    import debug_toolbar
Ejemplo n.º 3
0
if os.environ.get('SAMPLE_APP', False):
    urlpatterns += [
        url(
            r'^controller/',
            include(
                (get_controller_urls(config_views), 'controller'),
                namespace='controller',
            ),
        ),
        url(
            r'',
            include(('openwisp_controller.config.urls', 'config'),
                    namespace='config'),
        ),
        url(r'^geo/',
            include((get_geo_urls(geo_views), 'geo_api'),
                    namespace='geo_api')),
        url(
            r'^api/v1/',
            include(
                (get_config_api_urls(config_api_views), 'config_api'),
                namespace='config_api',
            ),
        ),
        url(
            r'^api/v1/',
            include(
                (
                    get_connection_api_urls(connection_api_views),
                    'connection_api',
                ),
Ejemplo n.º 4
0
if os.environ.get('SAMPLE_APP', False):
    urlpatterns += [
        path(
            'controller/',
            include(
                (get_controller_urls(config_views), 'controller'),
                namespace='controller',
            ),
        ),
        path(
            '',
            include(('openwisp_controller.config.urls', 'config'), namespace='config'),
        ),
        path(
            'geo/', include((get_geo_urls(geo_views), 'geo_api'), namespace='geo_api')
        ),
        path(
            'api/v1/',
            include(
                (get_config_api_urls(config_api_views), 'config_api'),
                namespace='config_api',
            ),
        ),
        path(
            'api/v1/',
            include(
                (
                    get_connection_api_urls(connection_api_views),
                    'connection_api',
                ),