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

feat: Allow @api_view wrapped functions as well. #13

Merged

Conversation

bikemule
Copy link
Contributor

Thank you for making this! I was looking for something like this and was only able to find the older project: https://bitbucket.org/hub9/django-hybrid-router/src/master/

It allows both APIView and @api_view in addition to ViewSets, but I had some issues (mainly not being able to prefix/nest things).

So I came back to your project and made the changes I needed to make it work.

I ran the tests with poetry run pytest and they all passed.

Let me know your thoughts!

@enzofrnt
Copy link
Owner

Hi,

thanks for your contribution.
Please write test that verify the behaviors that you expect. Also please make the CI run.

Thanks you !

@enzofrnt
Copy link
Owner

@bikemule any news ?

@bikemule bikemule force-pushed the feat/add-api-view-wrapped-function-support branch from d3ffde3 to dcbb34d Compare December 5, 2024 22:15
@bikemule
Copy link
Contributor Author

bikemule commented Dec 5, 2024

Hi,

Sorry I didn't see the notifications before.

Last time I didn't run pre-commit and when I did I got some errors that I fixed.

I added a test ,test_register_only_api_views and I modified test_add_views_and_viewsets to also add an api_view.

I ran pre-commit this time, everything passed.

I ran CI on Github and the only issue was a codecov rate limit error.

Let me know if I should change anything.

@enzofrnt
Copy link
Owner

enzofrnt commented Dec 6, 2024

Hi, @bikemule thanks you. I should make a fix on the CI, and then please rebase your branch thanks

@enzofrnt
Copy link
Owner

enzofrnt commented Dec 6, 2024

The modification should avoid the GitHub action issue

@bikemule bikemule force-pushed the feat/add-api-view-wrapped-function-support branch from dcbb34d to 1593ece Compare December 7, 2024 21:59
@enzofrnt enzofrnt changed the base branch from main to dev December 8, 2024 10:56
@enzofrnt enzofrnt merged commit 3b9e7da into enzofrnt:dev Dec 8, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants