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

Add more examples #2

Closed
hasansezertasan opened this issue Jan 24, 2024 · 4 comments · Fixed by #3
Closed

Add more examples #2

hasansezertasan opened this issue Jan 24, 2024 · 4 comments · Fixed by #3

Comments

@hasansezertasan
Copy link
Contributor

README.md is quite good but I think there must be a folder called "examples" for fully-fledged examples with templates folder and Jinja2 templates.

@volfpeter
Copy link
Owner

I think the example in the README should be enough for users who read the Jinja templating section of the FastAPI docs: https://fastapi.tiangolo.com/advanced/templates/?h=jinja#using-jinja2templates

If you submit a PR, I'll of course accept it. Or if other users request this, then I'll add two complete, working examples.

@hasansezertasan
Copy link
Contributor Author

I think the example in the README should be enough for users who read the Jinja templating section of the FastAPI docs: https://fastapi.tiangolo.com/advanced/templates/?h=jinja#using-jinja2templates

I still do recommend adding it because it's a new package, introducing a new (different) perspective to the development workflow. I'm saying "new" because many FastAPI users use dependencies instead of decorators (they are not the same but still...) and the @hx and @jinja approaches looks quite unusual (to me). So seeing a full example (as a playground) before jumping into it would offer a better developer experience.

If you submit a PR, I'll of course accept it. Or if other users request this, then I'll add two complete, working examples.

I'll take a look at it.

@hasansezertasan
Copy link
Contributor Author

@volfpeter I'm working on a Jinja2 example.

@volfpeter
Copy link
Owner

Thanks 🙂

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 a pull request may close this issue.

2 participants