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

  • SEARCH
  • Home
  • 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 8138009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:21:40+00:00 2026-06-06T11:21:40+00:00

When I read django code sometimes, I see in some templates load url from

  • 0

When I read django code sometimes, I see in some templates “load url from future”. I am not quite sure what this is but I do know it has something to do with URLs. How and when is this load url from future supposed to be used?

  • 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-06T11:21:42+00:00Added an answer on June 6, 2026 at 11:21 am

    It’s due to a change to the url tag enacted in 1.3:

    Changes to url and ssi

    Most template tags will allow you to pass in either constants or variables as arguments – for example:

    {% extends "base.html" %}
    

    allows you to specify a base template as a constant, but if you have a context variable templ that contains the value base.html:

    {% extends templ %}
    

    is also legal.

    However, due to an accident of history, the url and ssi are different. These tags use the second, quoteless syntax, but interpret the argument as a constant. This means it isn’t possible to use a context variable as the target of a url and ssi tag.

    Django 1.3 marks the start of the process to correct this historical accident. Django 1.3 adds a new template library – future – that provides alternate implementations of the url and ssi template tags. This future library implement behavior that makes the handling of the first argument consistent with the handling of all other variables. So, an existing template that contains:

    {% url sample %}
    

    should be replaced with:

    {% load url from future %}
    {% url 'sample' %}
    

    The tags implementing the old behavior have been deprecated, and in Django 1.5, the old behavior will be replaced with the new behavior. To ensure compatibility with future versions of Django, existing templates should be modified to use the new future libraries and syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I read Django code sometimes, I see in some templates reverse() . I
When I read Django code I often see in models what is called a
When I read django code I often see in models what is called sku,
Read on before you say this is a duplicate, it's not. (as far as
I'm test building a scraping site with django. For some reason the following code
Everybody in Django world seems to hate threadlocals( http://code.djangoproject.com/ticket/4280 , http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser ). I read
I'm currently trying to learn Django from the book and I read most of
I've had a read of this http://docs.b-list.org/django-registration/0.8/backend-api.html and i've had a shot at making
I have some code that uses subprocess to look at the logs from a
migrating from one django version to the next, usually requires that you read the

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.