Esempio n. 1
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin

from dashboard.views import LoginView, LogoutView, IndexView
from django.views.static import serve
#from opsweb.settings import STATIC_ROOT

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    #url(r'^static/(?P<path>.*)$', serve, {"document_root": STATIC_ROOT}),
    url('^$', IndexView.as_view(), name='index'),
    url('^index/', IndexView.as_view(), name='index'),
    url('^login/', LoginView.as_view(), name='login'),
    url('^logout/', LogoutView.as_view(), name='logout'),
    url('^dashboard/', include("dashboard.urls", namespace="dashboard")),
    url('^confd/', include('confd.urls', namespace='confd')),
]
Esempio n. 2
0
from django.urls import path
from dashboard.views import IndexView, LoginView, command_view, GroupCreateView, logout_view, GroupView, \
    ModuleCreateView, ModuleView, RunView, AgentView, ReportView

from django.contrib.auth.decorators import login_required

urlpatterns = [
    path('', IndexView.as_view()),
    path('login/', LoginView.as_view()),
    path('logout/', logout_view),
    path('command/', command_view),
    path('group/create/', login_required(GroupCreateView.as_view())),
    path('group/<int:group_id>/', login_required(GroupView.as_view())),
    path('module/add/', login_required(ModuleCreateView.as_view())),
    path('module/<uuid:module_id>/', login_required(ModuleView.as_view())),
    path('run/<int:group_id>/', login_required(RunView.as_view())),
    path('agent/<uuid:agent_id>/', login_required(AgentView.as_view())),
    path('report/<str:report_type>/<int:group_id>/',
         login_required(ReportView.as_view())),
    path('report/<str:report_type>/<uuid:entity_uuid>/',
         login_required(ReportView.as_view())),
]
Esempio n. 3
0
"""Infogram URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from dashboard.views import IndexView, LoginView, RegisterView


urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('login_infogram', LoginView.as_view(), name='login'),
    path('registro_infogram', RegisterView.as_view(), name='registro')
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 4
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include, re_path

from dashboard.views import LoginView, LogoutView, IndexView
from django.views.static import serve
#from opsweb.settings import STATIC_ROOT

urlpatterns = [
    path(r'admin/', admin.site.urls),
    #url(r'^static/(?P<path>.*)$', serve, {"document_root": STATIC_ROOT}),
    path('', IndexView.as_view(), name='index'),
    path('index/', IndexView.as_view(), name='index'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('dashboard/', include("dashboard.urls")),
    path('confd/', include('confd.urls')),
]