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

how to add decorator to methods avoiding problems #117

Open
Metal-Bat opened this issue Mar 19, 2024 · 1 comment
Open

how to add decorator to methods avoiding problems #117

Metal-Bat opened this issue Mar 19, 2024 · 1 comment

Comments

@Metal-Bat
Copy link

hi
i want to add some header to all of my request
something like this

platform: Annotated[str, Header(alias="PLATFORM")],

so i want to add it with decorators to my routs
but in a class it removes other routs and change the name of that rout to wrapper wich is in decorator

i knew i should use django ninja decorator
from ninja.decorators import decorate_view

but i am not sure in this case what should i use

@eadwinCode
Copy link
Owner

@Metal-Bat Can you please show some code examples? I don't really get what the problem is

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