Giter VIP home page Giter VIP logo

Comments (9)

asvetlov avatar asvetlov commented on May 12, 2024 1

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:

  1. There are no tests for implementation
  2. Keys for application and request should be prefixed with 'aiohttp_jinja2_' to avoid clashing with other libraries.
  3. Documentation should be updated.

from aiohttp-jinja2.

asvetlov avatar asvetlov commented on May 12, 2024

You may pass request into jinja context explicitly, isn't it?

from aiohttp-jinja2.

gleb-chipiga avatar gleb-chipiga commented on May 12, 2024

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.

asvetlov avatar asvetlov commented on May 12, 2024

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.

gleb-chipiga avatar gleb-chipiga commented on May 12, 2024

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.

imbolc avatar imbolc commented on May 12, 2024

Hey :) I am quite busy right now, but in one-two weeks I would have time to do it. Thanks :)

from aiohttp-jinja2.

asvetlov avatar asvetlov commented on May 12, 2024

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.

imbolc avatar imbolc commented on May 12, 2024

Done :)

from aiohttp-jinja2.

asvetlov avatar asvetlov commented on May 12, 2024

Fixed in #14

from aiohttp-jinja2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.