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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:56:06+00:00 2026-06-09T23:56:06+00:00

I have index.html, which loads project/p1.html, which loads project/p2.html. project/p1.html and project/p2.html each load

  • 0

I have index.html, which loads project/p1.html, which loads project/p2.html. project/p1.html and project/p2.html each load fine on their own, so I know they work correctly. The problem is trying to load project/p1.html into index.html, which has the statement:

{% include 'project/p1.html' %}

project/p1.html has the statement:

{% include 'project/p2.html' %}

Loading index.html, I get the error:

VariableDoesNotExist at /
Failed lookup for key [objects] in u"[{'params': {}}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x7fd3dc0e2410>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x7fd3dc0e2210>, 'user': <django.utils.functional.SimpleLazyObject object at 0x7fd3dc10c790>}, {},......

If I delete “{% include ‘project/p2.html’ %}” from project/p1.html, index.html loads fine and the error message dissapears (but obviously I can’t see my content).

How do I resolve this?

EDIT: Heres “project/p2.html”:

<table class="mytable">

{% for object in objects %}
    <tr class="my_row">
      <td>{{ object.name }}</td>
    </tr>
{% endfor %}
</table>

Here’s views.py:

from models import Mytable
from django.shortcuts import render_to_response, RequestContext

def my_request(request,
    template="project/p1.html",
    page_template="project/p2.html"):
    context = {
        'objects': Mytable.objects.all().order_by('-date'),
        'page_template': page_template,
    }

    if request.is_ajax():
        template = page_template
    return render_to_response(template, context,
        context_instance=RequestContext(request))
  • 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-09T23:56:08+00:00Added an answer on June 9, 2026 at 11:56 pm

    It’s looking for variables that aren’t available to it. Pass in additional context parameters.

    {% include "name_snippet.html" with person="Jane" greeting="Hello" %}

    EDIT: Documentation.

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

Sidebar

Related Questions

i am using php 5.2.8 i have index.html, which loads LOAD.PHP from IFRAME. iframe
I have a index.html file which loads html files. $('#content').load(url,function() {}); Inside those html
I have this code: function content(){ $(#23).load(http://www.example.com/index.html, alert('responded')); } Which is triggered when the
I have a view and template called index.html. I have a image which is
I have just a basic html form within index.php which contains two text fields:
I have a post html form, and the action is index.php, which is the
i shall state my problem here.. I have an index.html page which has a
I have an application that fires several processes. Each process loads an HTML file
I have a template in joomla without index.php I only have index.html, css file,
I have an index.html and global.css files. When I open these files at Coda,

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.