from . import views
from dynamic_rest.routers import DynamicRouter
from inspect import isclass

router = DynamicRouter()
for name in dir(views):
    view = getattr(views, name, None)
    if (
        isclass(view) and
        hasattr(view, 'serializer_class')
    ):
        router.register_resource(view)

urlpatterns = router.urls
