Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7778909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:31:02+00:00 2026-06-01T18:31:02+00:00

How to use this solution https://stackoverflow.com/a/10067749/604240 in jinja 2 template?

  • 0

How to use this solution https://stackoverflow.com/a/10067749/604240 in jinja 2 template?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:31:04+00:00Added an answer on June 1, 2026 at 6:31 pm

    I agree my question was due to lack of knowledge than problem. Eventually I figured it out how to achieve it. Basically I didn’t know how to link loop from python code to query so it’s available to Jinja2 template.

    Although correct solution might be to use map() with callback function https://developers.google.com/appengine/docs/python/ndb/queryclass#Query_map but I am using temporary solution which is working for me for now.

    query = Image.query()
    query2 = query.filter(Image.is_slider == 'yes')
    for item in query2:
        item.parent = item.key.parent().get()
    

    and in template

    {% for item in query2 %}
        <img src="{{ item.url }}=s1000" alt="{{ item.title }}" title="{{ item.title }}" />
        <h2>{{ item.title }}</h2>
        <h3>{{ item.gallery }}</h3>
        <a href="/gallery/{{ item.parent.slug }}">Go to gallery</a>
    {% endfor %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've referred to this very good reference: https://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more but I'm having some very serious
I was looking around for jQuery grid recommendations and came across this question/answers: https://stackoverflow.com/questions/159025/jquery-grid-recommendations
if your app use this solution , do do you plan port the app
I know one awkward solution for this taks will be : first use ct
I use contructor injection in my solution, but this one class has a property
I use this code: http://blogswizards.com/plugin-development/sliding-boxes-and-captions-with-jquery On a simple gallery site I am building. Specifically
I was asked to post this as a question on StackOverflow by http://twitter.com/jonathanjulian which
A google search gives me the following first result on HTML: <h3 class=r><a href=https://rads.stackoverflow.com/amzn/click/com/0470284889
use this website a lot but first time posting. My program creates a number
I use this code to update data in database table. Can reuse same code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.