Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug #1

Open
giripranay opened this issue Feb 5, 2020 · 0 comments
Open

Small bug #1

giripranay opened this issue Feb 5, 2020 · 0 comments

Comments

@giripranay
Copy link

giripranay commented Feb 5, 2020

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().

@giripranay giripranay reopened this Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant