"""_keenthemes URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.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 include, path
from django.conf import settings
# from _keenthemes.views import SystemView

from django.conf.urls.static import static
from _keenthemes import views
from django.urls import re_path
from django.views.static import serve
from django.conf.urls import handler404, handler500
from .views import custom_404_view, custom_500_view
urlpatterns = [
    path('thankyou/',views.thankyou,name='thankyou'),
    path('order/tracking-order-status/',views.tracking_order_status, name='tracking_order_status'),
    path('order/tracking-order-status-changes/',views.tracking_order_status_changes, name='tracking_order_status_changes'),
    path('order/tracking-order-status/search',views.tracking_order_status_search, name='tracking_order_status_search'),
    path('calendar/',views.calendar,name='calendar'),
    path('calendar_new/',views.calendar_new,name='calendar_new'),
    path('activity/<int:id>/',views.activity_invoice, name='activity_invoice'),
    path('get-events/',views.getEvents,name='calendarevents'),
    path('get-serial-numbers/',views.getserial,name='calendareventsserial'),
    path('get-job-numbers/',views.getjob,name='calendareventsjob'),
    path('get-lead-notes/',views.getleadnotes,name='calendareventsleadnotes'),
    path('get-calendar-allmodals/',views.allmodals,name='allmodals'),
    path('test-doc/',views.test_doc,name='test_doc'),
    path('merge_pdfs/',views.merge_pdfs,name='merge_pdfs'),
    path('admin/', admin.site.urls),
    path('', include('dashboards.urls')),

    path('', include('authentication.urls')),

    path('', include('product.urls')),

    path('', include('quotation.urls')),
    
    path('customer/', include('customer.urls')),
    
    path('supplier/', include('supplier.urls')),
    
    path('user/', include('user.urls')),
    
    path('leads/', include('leads.urls', namespace='leads')),

    path('', include('myobconnect.urls')),

    path('',include('technician.technician_api.urls')),

    path('',include('service.urls')),
    

    re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
    re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
]

handler404 = '_keenthemes.views.custom_404_view'
handler500 = '_keenthemes.views.custom_500_view'
# handler404 =path('not-found/',views.system_view,name='not-found')
# SystemView.as_view(template_name = 'pages/system/not-found.html', status=404)
# handler500 =path('error/',views.error,name='error')
# handler500 = SystemView.as_view(template_name = 'pages/system/error.html', status=500)
