Skip to content

Middle slash removed by "replace" #54

Closed
@philngo

Description

@philngo

In an DRF router endpoint I'm seeing the following behavior:

url(r'^api/v1/', include(router.urls)), # becomes "apiv1" in DRF docs output

Not sure exactly sure why slashes are being replaced on this line, but perhaps a strip('/') than replace('/','')would be more appropriate, as that would preserve slashes in the middle, like I need.

https://github.com/ekonstantinidis/django-rest-framework-docs/blob/9a85323c4147ec4ebb754a8b0373c956ee89b821/rest_framework_docs/api_endpoint.py#L1

Happy to make a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions