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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:39:38+00:00 2026-06-09T16:39:38+00:00

I have a developed a filter which does alot of database queries in my

  • 0

I have a developed a filter which does alot of database queries in my django templete. I have several uses for the same filter with the same values which will provide the same result on the same templete. I wish to save the filter result in a variable within the templete so I can make sure I dont re-run the same queries over again.

I cant send this from my view because I am doing this filter call in a for loop for each object in my model.

an example of what I need can be seen in the url tag :

{% url 'path.to.view' arg arg2 as the_url %}

I need the “as” operation over a filter.

  • 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-09T16:39:39+00:00Added an answer on June 9, 2026 at 4:39 pm
    {% with bla=arg|foo %}
      {% url 'view' bla %}
    {% endwith %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed the following user script which will show the html element under
I have developed an Application which needs compiled as x86 because it uses a
I have developed a small administration page for game servers which you can add/remove/edit
i have developed an app which executes sql jobs. When I click on execute
I have developed several general purpose script functions, for Google Spreadsheet apps. Currently I
I currently have a form based login in my application which is developed on
We have developed a Web Application using grails, groovy and oracle as database with
I have a somewhat complex query with multiple (nested) sub-queries, which I want to
I have developed an Android application using Eclipse which works perfectly on the Android
I have developed a program which makes use of serial programming to read and

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.