# Path: examples/django_rest_framework/backend/backend/api/views.py
# class AccountViewSet(ModelViewSet):
#     queryset = Account.objects.all()
#     serializer_class = AccountSerializer
# 
# class ReporterViewSet(ModelViewSet):
#     queryset = Reporter.objects.all()
#     serializer_class = ReporterSerializer
# 
# class ArticleViewSet(ModelViewSet):
#     queryset = Article.objects.all()
#     serializer_class = ArticleSerializer
# 
# class TagViewSet(ModelViewSet):
#     queryset = Tag.objects.all()
#     serializer_class = TagSerializer
#     # Do not paginate the tags, for unpaginated testing
#     paginate_by = None
# 
# class ReversedArticleViewSet(ModelViewSet):
#     queryset = Article.objects.all()
#     serializer_class = ReversedArticleSerializer
# 
# class ReversedReporterViewSet(ModelViewSet):
#     queryset = Reporter.objects.all()
#     serializer_class = ReversedReporterSerializer
# 
# class ReversedTagViewSet(ModelViewSet):
#     queryset = Tag.objects.all()
#     serializer_class = ReversedTagSerializer
# 
# class ReversedAccountViewSet(ModelViewSet):
#     queryset = Account.objects.all()
#     serializer_class = ReversedAccountSerializer


from rest_framework import routers
from .api.views import AccountViewSet, ReporterViewSet, ArticleViewSet, \
    TagViewSet, ReversedArticleViewSet, ReversedReporterViewSet, \
    ReversedTagViewSet, ReversedAccountViewSet


# API
router = routers.DefaultRouter()
router.register(r'accounts', AccountViewSet, base_name='account')
router.register(r'reporters', ReporterViewSet, base_name='reporter')
router.register(r'articles', ArticleViewSet, base_name='article')
router.register(r'tags', TagViewSet, base_name='tag')
router.register(r'reversed/tags', ReversedTagViewSet, base_name='reversedtag')
router.register(r'reversed/articles', ReversedArticleViewSet, base_name='reversedarticle')

# Path: examples/django_rest_framework/backend/backend/api/views.py
# class AccountViewSet(ModelViewSet):
#     queryset = Account.objects.all()
#     serializer_class = AccountSerializer
# 
# class ReporterViewSet(ModelViewSet):
#     queryset = Reporter.objects.all()
#     serializer_class = ReporterSerializer
# 
# class ArticleViewSet(ModelViewSet):
#     queryset = Article.objects.all()
#     serializer_class = ArticleSerializer
# 
# class TagViewSet(ModelViewSet):
#     queryset = Tag.objects.all()
#     serializer_class = TagSerializer
#     # Do not paginate the tags, for unpaginated testing
#     paginate_by = None
# 
# class ReversedArticleViewSet(ModelViewSet):
#     queryset = Article.objects.all()
#     serializer_class = ReversedArticleSerializer
# 
# class ReversedReporterViewSet(ModelViewSet):
#     queryset = Reporter.objects.all()
#     serializer_class = ReversedReporterSerializer
# 
# class ReversedTagViewSet(ModelViewSet):
#     queryset = Tag.objects.all()
#     serializer_class = ReversedTagSerializer
# 
# class ReversedAccountViewSet(ModelViewSet):
#     queryset = Account.objects.all()
#     serializer_class = ReversedAccountSerializer


# Path: examples/django_rest_framework/backend/backend/urls.py
from rest_framework import routers
from .api.views import AccountViewSet, ReporterViewSet, ArticleViewSet, \
    TagViewSet, ReversedArticleViewSet, ReversedReporterViewSet, \
    ReversedTagViewSet, ReversedAccountViewSet



# API
router = routers.DefaultRouter()
router.register(r'accounts', AccountViewSet, base_name='account')
router.register(r'reporters', ReporterViewSet, base_name='reporter')
router.register(r'articles', ArticleViewSet, base_name='article')
router.register(r'tags', TagViewSet, base_name='tag')
router.register(r'reversed/tags', ReversedTagViewSet, base_name='reversedtag')
router.register(r'reversed/articles', ReversedArticleViewSet, base_name='reversedarticle')

router.register(r'reversed/reporters', ReversedReporterViewSet, base_name='reversedreporter')