generated from app-generator/django-argon-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 5
/
urls.py
29 lines (23 loc) · 853 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from django.urls import path, re_path
from app import views
from rest_framework import routers
from app.views import TrafficViewSet, VisitViewSet
router = routers.SimpleRouter()
router.register(r'api/v1/traffics', TrafficViewSet, basename="traffics")
router.register(r'api/v1/visits', VisitViewSet, basename="visits")
urlpatterns = router.urls + [
# The home page
path('', views.index, name='home'),
# transactions
re_path(r'^transactions/(?:(?P<pk>\d+)/)?(?:(?P<action>\w+)/)?', views.TransactionView.as_view(),
name='transactions'),
# Matches any html file - to be used for gentella
# Avoid using your .html in your resources.
# Or create a separate django app.
re_path(r'^.*\.html', views.pages, name='pages'),
]