Exemplo n.º 1
0
from mymoney.api.bankaccounts.routers import BankAccountRouter

from .views import RatioAnalyticsViewSet, TrendTimeAnalyticsViewSet

ratio_router = BankAccountRouter()
ratio_router.register(
    r'ratio', RatioAnalyticsViewSet, base_name='ratio')

trendtime_router = BankAccountRouter()
trendtime_router.register(
    r'trendtime', TrendTimeAnalyticsViewSet, base_name='trendtime')

urlpatterns = []
urlpatterns += ratio_router.urls
urlpatterns += trendtime_router.urls
Exemplo n.º 2
0
from mymoney.api.banktransactionschedulers.views import \
    BankTransactionSchedulerViewSet
from mymoney.api.banktransactiontags.views import BankTransactionTagViewSet
from mymoney.api.users.views import LoginAPIView, LogoutAPIView, UserViewSet
from mymoney.core.views import ConfigAPIView

user_router = DefaultRouter()
user_router.register(
    r'', UserViewSet, base_name='user')

bankaccounts_router = DefaultRouter()
bankaccounts_router.register(
    r'', BankAccountViewSet, base_name='bankaccount')

banktransactions_router = BankAccountRouter()
banktransactions_router.register(
    r'', BankTransactionViewSet, base_name='banktransaction')

banktransactiontags_router = DefaultRouter()
banktransactiontags_router.register(
    r'', BankTransactionTagViewSet, base_name='banktransactiontag')

banktransactionschedulers_router = BankAccountRouter()
banktransactionschedulers_router.register(
    r'', BankTransactionSchedulerViewSet, base_name='banktransactionscheduler')

urlpatterns = [
    url(r'^config/$', ConfigAPIView.as_view(), name='config'),
    url(r'^login/$', LoginAPIView.as_view(), name='login'),
    url(r'^logout/$', LogoutAPIView.as_view(), name='logout'),
    url(
        r'^user', include(