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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:27:18+00:00 2026-05-13T12:27:18+00:00

In this template, <body><p>You searched for: <strong>{{ first }} {{ last }}</strong></p> {% if

  • 0

In this template,

<body><p>You searched for: <strong>{{ first }} {{ last }}</strong></p>

{% if lawyers %}
    <p>There are {{ lawyers|length }} schoolmates of <strong>{{ first }} {{ last }}</strong> in the database:</p>
    <ul>
        {% for lawyer in lawyers %}
        <li> {{ lawyer.first }} {{ lawyer.last }} {{ lawyer.firm_name }} {{ lawyer.school }} {{ lawyer.year_graduated }}</li>
        {% endfor %}
    </ul>

{% else %}
    <p><strong>{{ first }} {{ last }}</strong> has no classmates in the database. Try another lawyer.</p>
{% endif %} 

I pick up {{ first }} and {{ last }} from the search form but not the other parameters such as year_graduated.

But I want to be able to say:

<p>You searched for: <strong> {{ first }} {{ last }}, class of {{ year_graduated }} </strong> </p>

How can I use lawyer.year_graduated in the template even though it is not in the search form?

See my previous question for the view function.

Thank you.

  • 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-05-13T12:27:19+00:00Added an answer on May 13, 2026 at 12:27 pm

    Well, the easy way would just be to add year_graduated to the context dict.

    return render_to_response('search_results.html', {'lawyers': lawyers1, 'last': last_name, 'first': first_name, 'year_graduated': q_year[0], 'form': form})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This application returns schoolmates of lawyers . When a user searches for first name
This is my first foray into Twitter Bootstrap. Take a look at this template
There are some directories in the working directory with this template cas-2-32 sat-4-64 ...
I have a template called Person, and this template has eyes, hands, body, and
132 a:4:{s:8:template;a:1:{s:10:index.html;b:1;}s:9:timestamp;i:1256373019;s:7:expires;i:1256373079;s:13:cache_serials;a:0:{}}<body> php<br > java<br > c++<br > </body> Can someone explain this part:
Consider this template function: template<typename ReturnT> ReturnT foo(const std::function<ReturnT ()>& fun) { return fun();
In a template function that looks like this: template<typename T> constexpr T foo(T a,
I've written this template inclusion tag: @register.inclusion_tag('blog/post_detail.html') def post_detail(post, show_meta=True): return { 'post': post,
So I have this template design that is currently absolutely positioned, but I'm trying
i have this template field inside a gridview. <asp:TemplateField ItemStyle-HorizontalAlign=Center> <ItemTemplate> <asp:ImageButton ID=ImageButton2 ImageUrl=~/images/DeleteRecord.gif

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.