from django.conf import settings
from django.urls import include, path
from django.contrib import admin
from django.http import HttpResponse
from django.contrib.auth import views as auth_views
from users import views as user_views

urlpatterns = [
    path('health', lambda request : HttpResponse('okay')),
    path('admin/', admin.site.urls),
    path('register/', user_views.register, name='register'),
    path('profile/', user_views.profile, name='profile'),
    path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),
    path('logout/', auth_views.LogoutView.as_view(template_name='users/logout.html'), name='logout'),
    path('', include('qcareers.urls')),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
