sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.3k stars 221 forks source link

Add resource loading in jinja templates #706

Open sansyrox opened 10 months ago

sansyrox commented 10 months ago

For the jinja implementation would it be possible to add something to load the resources like Flask:

{{ url_for('static', filename='images/planets.jpeg') }} or Starlette :

{{ url_for('static', path='images/planets.jpeg') }} or for a route:

{{ url_for('/') }} Because currently using url_for makes the template crash and returns a 500 error ...

Out put this point the integration of jinja works well good job ;)

sansyrox commented 7 months ago

We will have to include the work done in this PR - https://github.com/sparckles/Robyn/pull/738/files

And then build upon it !

carrycooldude commented 7 months ago

Hey @sansyrox , I created a PR #758 have a look on it.