from django.urls import path, re_path

from .views import (
    DomainListCreateView, DomainDetailView,
    CategoryListCreateView, CategoryDetailView,
    ServeFileView,
)

urlpatterns = [
    re_path(r'^domains$', DomainListCreateView.as_view(), name="domain_list_create"),
    re_path(r'^domains/(?P<id>[0-9]+)$', DomainDetailView.as_view(), name="domain_detail"),

    re_path(r'^categories$', CategoryListCreateView.as_view(), name="category_list_create"),
    re_path(r'^categories/(?P<id>[0-9]+)$', CategoryDetailView.as_view(), name="category_detail"),

    path('serve-file/', ServeFileView.as_view(), name="serve_file"),
]