jpadilla / django-rest-framework-xml

XML support for Django REST Framework

Home Page:http://jpadilla.github.io/django-rest-framework-xml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error, when URL contains / xml rendering fails

Haaroon opened this issue · comments

In django urls, when using routers as follows the code XML renders fine at the api root

router = routers.DefaultRouter() 
router.register(r'users', views.UserViewSet)
router.register(r'review', views.ReviewViewSet)

However when using routers which contain a / the render fails at the api root.

router = routers.DefaultRouter()
router.register(r'api/users', views.UserViewSet)
router.register(r'api/review', views.ReviewViewSet)

Is there any reasoning to why this happens?

@PhoenixVII had the same issue

@Haaroon - I'm sorry for the delayed response on this.

If you'd still like this looked at, please:

  • elaborate on 'failed at the api root' - what do you mean? How did it fail? 404 Not Found?
  • Provide some replication steps and outline the code in your viewsets

Thanks