from django.conf import settings
from django.urls import path, include
from django.contrib import admin
from test_app import views
from django.shortcuts import redirect, HttpResponseRedirect
from django.contrib.auth.views import LogoutView, LoginView

urlpatterns = [
    path('accounts/', include('allauth.urls')),
    path('accounts/', include('allauth.urls')),
    path('social-auth/', include('social_django.urls', namespace="social")),

    path('admin/', admin.site.urls),
    path('student/', include('student.urls')),

    path('', views.home_view, name=''),
    path('logout', LogoutView.as_view(template_name='quiz/logout.html'), name='logout'),
    path('aboutus', views.aboutus_view, name='aboutus'),
    path('contactus', views.contactus_view, name='contact-us'),
    # path('afterlogin', views.afterlogin_view, name='afterlogin'),

    path('adminclick', views.adminclick_view, name='admin-click'),
    path('adminlogin', LoginView.as_view(template_name='quiz/adminlogin.html'), name='adminlogin'),
    path('admin-dashboard', views.admin_dashboard_view, name='admin-dashboard'),

    path('admin-student', views.admin_student_view, name='admin-student'),
    path('admin-view-student', views.admin_view_student_view, name='admin-view-student'),
    path('admin-view-student-marks', views.admin_view_student_marks_view, name='admin-view-student-marks'),
    path('admin-view-marks/<int:pk>', views.admin_view_marks_view, name='admin-view-marks'),
    path('admin-check-marks/<int:pk>', views.admin_check_marks_view, name='admin-check-marks'),
    path('update-student/<int:pk>', views.update_student_view, name='update-student'),
    path('delete-student/<int:pk>', views.delete_student_view, name='delete-student'),

    path('admin-course', views.admin_course_view, name='admin-course'),
    path('admin-add-course', views.admin_add_course_view, name='admin-add-course'),
    path('admin-view-course', views.admin_view_course_view, name='admin-view-course'),
    path('delete-course/<int:pk>', views.delete_course_view, name='delete-course'),

    path('admin-question', views.admin_question_view, name='admin-question'),
    path('admin-add-question', views.admin_add_question_view, name='admin-add-question'),
    path('admin-view-question', views.admin_view_question_view, name='admin-view-question'),
    path('view-question/<int:pk>', views.view_question_view, name='view-question'),
    path('delete-question/<int:pk>', views.delete_question_view, name='delete-question'),

]
