from django.urls import path, include
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings

from documents.views import (
  Doc_Create,
  Doc_List,
  Doc_Detail,
  Doc_List_Search
)
from myapp.views import (
  Home_View,
)
from users.views import (
  SignInView,
  SignUpView,
  LogoutView,
  Profile
)
from posts.views import (
  BaiVietDetail,
  ListBaiViet
)
from about.views import About

urlpatterns = [
    # Admin
    path('admin/', admin.site.urls),
    # path('teacher/', admin.site.urls),
    # path('teacher/class', admin.site.urls),
    # path('teacher/class/<str:slug>', admin.site.urls),
    
    # Home
    path('', Home_View.as_view(), name='home'),
    
    # Auth
    path('signin/', SignInView.as_view(), name='sign_in'),
    path('signup/', SignUpView.as_view(), name='sign_up'),
    path('logout/', LogoutView.as_view(), name='log_out'),
    
    # Document
    path('docs/create/', Doc_Create.as_view(), name='doc_create'),
    path('docs/detail/<slug>/', Doc_Detail.as_view(), name='detail_doc'),
    path('docs/<category>/', Doc_List.as_view(), name='doc_cate'),
    path('docs/', Doc_List.as_view(), name='doc_all'),
    path('docs/search/', Doc_List_Search.as_view(), name='search'),
    
    # Paymet
    path('ckeditor/', include('ckeditor_uploader.urls')),    
    path('cart/', include('cart.urls')),

    # Post
    path('post/', ListBaiViet.as_view(),name='Listpost'),
    path('post/<slugg>/', BaiVietDetail.as_view(), name='post_detail'),
    
    # About
    path('about/', About.as_view(), name='about'),
    path('profile/', Profile.as_view(), name='profile'),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

from django.urls import path, include
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings

from documents.views import (
  Doc_Create,
  Doc_List,
  Doc_Detail,
  Doc_List_Search
)
from myapp.views import (
  Home_View,
)
from users.views import (
  SignInView,
  SignUpView,
  LogoutView,
  Profile
)
from posts.views import (
  BaiVietDetail,
  ListBaiViet
)
from about.views import About

urlpatterns = [
    # Admin
    path('admin/', admin.site.urls),
    # path('teacher/', admin.site.urls),
    # path('teacher/class', admin.site.urls),
    # path('teacher/class/<str:slug>', admin.site.urls),
    
    # Home
    path('', Home_View.as_view(), name='home'),
    
    # Auth
    path('signin/', SignInView.as_view(), name='sign_in'),
    path('signup/', SignUpView.as_view(), name='sign_up'),
    path('logout/', LogoutView.as_view(), name='log_out'),
    
    # Document
    path('docs/create/', Doc_Create.as_view(), name='doc_create'),
    path('docs/detail/<slug>/', Doc_Detail.as_view(), name='detail_doc'),
    path('docs/<category>/', Doc_List.as_view(), name='doc_cate'),
    path('docs/', Doc_List.as_view(), name='doc_all'),
    path('docs/search/', Doc_List_Search.as_view(), name='search'),
    
    # Paymet
    path('ckeditor/', include('ckeditor_uploader.urls')),    
    path('cart/', include('cart.urls')),

    # Post
    path('post/', ListBaiViet.as_view(),name='Listpost'),
    path('post/<slugg>/', BaiVietDetail.as_view(), name='post_detail'),
    
    # About
    path('about/', About.as_view(), name='about'),
    path('profile/', Profile.as_view(), name='profile'),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# Admin # path('teacher/', admin.site.urls), # path('teacher/class', admin.site.urls), # path('teacher/class/<str:slug>', admin.site.urls), # Home # Auth # Document # Paymet # Post # About