30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from django.urls import path, include
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from . import views
|
|
from . import api_views
|
|
|
|
app_name = 'don_confiao'
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'sales', api_views.SaleView, basename='sale')
|
|
router.register(r'customers', api_views.CustomerView, basename='customer')
|
|
router.register(r'products', api_views.ProductView, basename='product')
|
|
|
|
|
|
urlpatterns = [
|
|
path("", views.index, name="wellcome"),
|
|
path("comprar", views.buy, name="buy"),
|
|
path("compras", views.purchases, name="purchases"),
|
|
path("productos", views.products, name="products"),
|
|
path("lista_productos", views.ProductListView.as_view(), name='product_list'),
|
|
path("importar_productos", views.import_products, name="import_products"),
|
|
path("exportar_ventas_para_tryton",
|
|
views.exportar_ventas_para_tryton,
|
|
name="exportar_ventas_para_tryton"),
|
|
path("cuadrar_tarro", views.reconciliate_jar, name="reconciliate_jar"),
|
|
path("cuadres", views.reconciliate_jar, name="reconciliations"),
|
|
path("resumen_compra/<int:id>", views.purchase_summary, name="purchase_summary"),
|
|
path('api/', include(router.urls)),
|
|
]
|