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

class_based_views doesn't work for me v1.0 #75

Closed
gbnk0 opened this issue Feb 25, 2018 · 6 comments
Closed

class_based_views doesn't work for me v1.0 #75

gbnk0 opened this issue Feb 25, 2018 · 6 comments

Comments

@gbnk0
Copy link
Contributor

gbnk0 commented Feb 25, 2018

I tried to add class_based_views, like in the documentation:

class MyEndpoint(BaseEndpoint):

    def test(self):
        return True

my_views = (
    ('/tests', MyEndpoint)
)


initialize(app, class_based_views=my_views)

I get a 404. Misconfiguration made by me or bug?

@gbnk0
Copy link
Contributor Author

gbnk0 commented Feb 25, 2018

I also tried with the /register exmaple

@gbnk0 gbnk0 changed the title class_based_views doesn't work for me class_based_views doesn't work for me v1.0 Feb 25, 2018
@gbnk0
Copy link
Contributor Author

gbnk0 commented Feb 25, 2018

ok, i understand, "class_based_views" is only present in the documentation but not in the sanic_jwt code

@ahopkins
Copy link
Owner

This is a mistake on my part. class_based_views in the documentation should read class_views.

@ahopkins
Copy link
Owner

Look at test_endpoints_extra.py for an example.

@gbnk0
Copy link
Contributor Author

gbnk0 commented Feb 25, 2018

Ok, thanks !

@ahopkins
Copy link
Owner

Docs have been updated.

image

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

2 participants