Comments (9)
Ok, I'm going to change my mind.
I've been closed #8 as wontfix but after second request for the same feature I think it worth to be implemented.
If you or @imbolc want to pickup PR #8 I will merge it after kindly review.
For now I see at least two issues:
- There are no tests for implementation
- Keys for application and request should be prefixed with
'aiohttp_jinja2_'
to avoid clashing with other libraries. - Documentation should be updated.
from aiohttp-jinja2.
You may pass request
into jinja context explicitly, isn't it?
from aiohttp-jinja2.
Of course, but many web frameworks pass a set of useful objects and functions into template namespace.
They have this feature of the box.
from aiohttp-jinja2.
Good to them, but I don't want to introduce jinja2 middleware for implicitly passing request into context.
What frameworks are you talking about?
AFAIK only Flask support implicit request in template context due global nature of request object in Flask (I consider global-ness is a bad thing). Maybe there is possibility to do the same with bottle, but for Django or Pyramid it's just impossible.
from aiohttp-jinja2.
I'm not just talking about the request. Django has django.core.context_processors.request and for example 'url' tag to resolve url names. Tornado has 'reverse_url' and 'static_url' template functions and 'request' and 'handler' objects.
from aiohttp-jinja2.
Hey :) I am quite busy right now, but in one-two weeks I would have time to do it. Thanks :)
from aiohttp-jinja2.
Cool!
On Tue, Jun 9, 2015 at 5:54 AM, Imblc [email protected] wrote:
Hey :) I am quite busy right now, but in one-two weeks I would have time
to do it. Thanks :)—
Reply to this email directly or view it on GitHub
#13 (comment)
.
Thanks,
Andrew Svetlov
from aiohttp-jinja2.
Done :)
from aiohttp-jinja2.
Fixed in #14
from aiohttp-jinja2.
Related Issues (20)
- Is it possible to add extensions to jinja2? HOT 2
- No matching distribution found for aiohttp-jinja2==1.1.0 HOT 3
- Documentation on ReadTheDocs is outdated HOT 3
- Add type hints
- Documentation basic usage missing a get_env example HOT 2
- Load Templates after Setup HOT 1
- filters from setup(...) has incorrect type annotation
- Support async rendering HOT 4
- context_processors arg to setup has wrong type annotation HOT 4
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Deploy latest docs HOT 3
- Make typing_extensions just optional dependency HOT 2
- Two or more aiohttp_jinja2.setup in one project
- Deprecation warnings HOT 3
- jinja2 package version clash when installed as part of connexion[aiohttp] HOT 2
- AttributeError: module 'jinja2' has no attribute 'contextfunction' HOT 2
- How do I employ cache busting in a template?
- Link to readthedocs is broken HOT 1
- RTD PR status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiohttp-jinja2.