Skip to content

Small bug #1

Description

@giripranay

rest_example/rest_example/urls.py/

Line number: 14

url(r'^users/', views.UserList.as_view())

For the above line, you need to add '$' at the end of regular expression

url(r'^users/$', views.UserList.as_view())

The issue without '$' sign is that it always calls views.UserList.as_view().
If you add a '$' sign, it will call views.UserDetail.as_view().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions