from django.urls import path, include from django.contrib.auth import views as auth_views from django.contrib import admin from django.conf import settings from oauth2_provider.urls import metadata_urlpatterns from core import views from projects import views as project_views urlpatterns = [ *metadata_urlpatterns, path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')), path('admin/', admin.site.urls), path('accounts/login/', project_views.ThrottledLoginView.as_view(), name='login'), path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout'), path('accounts/password/change/', auth_views.PasswordChangeView.as_view(template_name='projects/form.html', success_url='/projects/profile/'), name='password_change'), path('projects/', include('projects.urls')), path("", views.today, name="today"), path("health/", views.health, name="health"), path("energy/", views.energy, name="energy"), path("home/", views.home, name="home"), path("showcase/", views.showcase, name="showcase"), ] if settings.OIDC_ENABLED: urlpatterns.insert(0, path('oidc/', include('mozilla_django_oidc.urls')))