from django.contrib import admin
from django.urls import path, include

from web.views.account_management import signup, custom_logout, profile, denied, code_of_ethics, user_profile
from web.views.admin import manage_users
from web.views.api import users
from web.views.forum import forum_threads, thread


urlpatterns = [
    path("", forum_threads, name='index'),
    path('admin/', admin.site.urls),
    path('markdownx/', include('markdownx.urls')),
    path('api/users/', users, name='users'),
    path("accounts/", include("django.contrib.auth.urls")),
    path("accounts/profile/", profile, name="profile"),
    path("accounts/signup/", signup, name="signup"),
    path('accounts/user_management/', manage_users, name="user_management"),
    path("accounts/user/<user_id>", user_profile, name="user"),
    path("accounts/denied/", denied, name="denied"),
    path('logout/', custom_logout, name='custom_logout'),
    path("code_of_ethics", code_of_ethics, name="code_of_ethics"),
    path("forum/threads/", forum_threads, name='forum_threads'),
    path("forum/thread/<thread_id>", thread, name='thread'),
    path('captcha/', include('captcha.urls')),
]
