from django.contrib import admin
from django.shortcuts import render
from django.urls import include, path
from rest_framework import routers

admin.site.site_title = "PyInv Admin"
admin.site.site_header = "PyInv Admin"
admin.site.index_title = "PyInv Admin"

router = routers.DefaultRouter()


urlpatterns = [
    path("", include("inventory.urls", namespace="inventory")),
    path("accounts/", include("accounts.urls", namespace="accounts")),
    path("admin/", admin.site.urls),
    path("api/", include(router.urls)),
    path('auth/', include('django_registration.backends.activation.urls')),
    path("auth/", include("django.contrib.auth.urls")),
]


def handler403(request, exception, template_name="403.html"):
    return render(request, template_name, {}, status=403)


def handler404(request, exception, template_name="404.html"):
    return render(request, template_name, {}, status=404)

from django.contrib import admin
from django.shortcuts import render
from django.urls import include, path
from rest_framework import routers

admin.site.site_title = "PyInv Admin"
admin.site.site_header = "PyInv Admin"
admin.site.index_title = "PyInv Admin"

router = routers.DefaultRouter()


urlpatterns = [
    path("", include("inventory.urls", namespace="inventory")),
    path("accounts/", include("accounts.urls", namespace="accounts")),
    path("admin/", admin.site.urls),
    path("api/", include(router.urls)),
    path('auth/', include('django_registration.backends.activation.urls')),
    path("auth/", include("django.contrib.auth.urls")),
]


def handler403(request, exception, template_name="403.html"):
    return render(request, template_name, {}, status=403)


def handler404(request, exception, template_name="404.html"):
    return render(request, template_name, {}, status=404)
