2023-03-29 14:06:11 -03:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import path
|
2023-03-29 18:35:23 -03:00
|
|
|
from core import views as core_views
|
2023-03-30 15:49:52 -03:00
|
|
|
from ecommerce import views as ecommerce_views
|
2023-03-30 13:02:53 -03:00
|
|
|
from rest_framework import routers
|
|
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
2023-03-29 14:06:11 -03:00
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
2023-03-30 15:49:52 -03:00
|
|
|
router.register(r'item', ecommerce_views.ItemViewSet, basename='item')
|
|
|
|
router.register(r'order', ecommerce_views.OrderViewSet, basename='order')
|
2023-03-29 14:06:11 -03:00
|
|
|
|
|
|
|
urlpatterns = router.urls
|
|
|
|
|
|
|
|
urlpatterns += [
|
|
|
|
path('admin/', admin.site.urls),
|
2023-03-29 18:35:23 -03:00
|
|
|
path('contact/', core_views.ContactAPIView.as_view()),
|
2023-03-30 13:02:53 -03:00
|
|
|
path('api-token-auth/', obtain_auth_token),
|
2023-03-29 14:06:11 -03:00
|
|
|
]
|