21 lines
420 B
Python
21 lines
420 B
Python
from django.conf import settings
|
|
|
|
from rest_framework import routers
|
|
|
|
from .viewsets import (
|
|
GraphViewset,
|
|
MonthlyTransactionViewset,
|
|
TransactionViewset,
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
router = routers.DefaultRouter()
|
|
else:
|
|
router = routers.SimpleRouter()
|
|
|
|
router.register("g", GraphViewset)
|
|
router.register("t", TransactionViewset)
|
|
router.register("m", MonthlyTransactionViewset)
|
|
|
|
urlpatterns = router.urls
|