from django.urls import path, re_path, include
from django.conf import settings

from courses import views
from courses.p117 import views as p117views
from courses.p064 import views as p064views
from courses.p151 import views as p151views

# This is included in djphys.urls with the prefix c/
urlpatterns = [
    path('', views.home),
    path('private/<path:fullpath>', views.xsendfile),
    re_path('[Mm]athematica/', views.mathematica),
    path('load/', views.load_schedule),
    path('<slug:order_field>/<slug:command>/', views.dispatch),
    path('<slug:order_field>/', views.dispatch),
    #path('download/', p151views.download),
    # path('p117/', 'courses.p117.views.home'),
    path('p117/', include([
        path('pretest/', p117views.pretest),
        path('book/', p117views.book),
        path('project/', p117views.project),
    ])),
    path('p064/', include([
        path('pages/', p064views.pages),
        path('search/', p064views.search),
        path('project/', p064views.project),
    ])),
    path('p151/', include([
        path('pages/', p151views.pages),
        path('search/', p151views.search),
        #path('project/', p064views.project),
    ])),
]
