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 8213839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:15:22+00:00 2026-06-07T11:15:22+00:00

I have the following dictionary passed to a render function, with sources being a

  • 0

I have the following dictionary passed to a render function, with sources being a list of strings and title being a string potentially equal to one of the strings in sources:

{'title':title, 'sources':sources})

In the HTML template I’d like to accomplish something among the lines of the following:

{% for source in sources %}
  <tr>
    <td>{{ source }}</td>
    <td>
      {% if title == {{ source }} %}
        Just now!
      {% endif %}
    </td>
  </tr>
{% endfor %}

However, the following block of text results in an error:

TemplateSyntaxError at /admin/start/
Could not parse the remainder: '{{' from '{{'

…with {% if title == {{ source }} %} being highlighted in red.

  • 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-07T11:15:24+00:00Added an answer on June 7, 2026 at 11:15 am

    You shouldn’t use the double-bracket {{ }} syntax within if or ifequal statements, you can simply access the variable there like you would in normal python:

    {% if title == source %}
       ...
    {% endif %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code snippet: Dictionary<int, List<string>> likeListDict = new Dictionary<int, List<string>>(); List<string>
I have the following code to populate a DropDownList var list = new Dictionary<string,
Suppose I have the following dictionary and list: my_dictionary = {1:hello, 2:goodbye, 3:World, sand:box}
I have the following code: // Dictionary which I want to optimize Dictionary<string, MyClass>
I have the following decleration: private Dictionary<string, Dictionary<string, File>> listFiles = new Dictionary<string,Dictionary<string,File>>(); How
I have the following nested dictionaries: Dictionary<int, Dictionary<string, object>> x; Dictionary<int, SortedDictionary<long, Dictionary<string, object>>>
I have a method with the following signature: public ActionResult RenderFamilyTree(string name, Dictionary<string, string>
I have a list of strings parsed from somewhere, in the following format: [key1,
I have following data: Dictionary<string,string> dctParameters = new Dictionary(){ {a,var1},{b,var2},{c,var3},.... } I want to
I have the following Dictionary content : [0] {75, SimpleObject} [1] {56, SimpleObject} [2]

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.