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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:36:15+00:00 2026-05-25T00:36:15+00:00

I’m having a problem with displaying the contents within the block tags of a

  • 0

I’m having a problem with displaying the contents within the block tags of a child template. I have a base.html and a dash.html which extends the base. When I go to the dash.html page the base.html is extended but the contents set within the block tags of dash.html do not show up. So I get the same thing when I go base.html and dash.html.

Here is my code:

base.html

<!DOCTYPE HTML>
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>SCV Discount</title>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    <link rel="stylesheet" href="static/css/main.css">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js"></script>
</head>
<body>
<!-- Main Header -->
<div id="top">
    <div id="header">
        <a href="/"><div id="logo"></div></a>
        {% block head %}{% endblock %}
    </div>
</div>

<!-- Middle -->
<div id="mid">
    {% block mid %}{% endblock %}
</div>

<!-- Content -->
<div id="analytics-content">
    {% block main %}{% endblock %}
</div>

<!-- Scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="static/js/libs/jquery-1.6.2.min.js">\x3C/script>')</script>
<script src="static/js/libs/select.js"></script>
<script src="static/js/main.js"></script>
</body>
</html>

dash.html

{% extends 'base.html' %}

{% block head %}
    <p class="dashboard-title">Elephant Bar</p>
    <p class="cp_badge round">Control Panel</p>
{% endblock %}

{% block mid %}
    {% include 'modules/meters.html' %}
    {% include 'modules/client_ctl.html' %}
{% endblock %}

{% block main %}
    {% include 'modules/history.html' %}
{% endblock %}

view.py

from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.template import RequestContext
import datetime

def index(request):
    return render_to_response('base.html', RequestContext(request))

def dash(request):
    return render_to_response('dash.html', RequestContext(request))

Hope that is enough information. Please let me know what other info I can provide. Thanks in advance. I appreciate it.

  • 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-25T00:36:16+00:00Added an answer on May 25, 2026 at 12:36 am

    I just copied & pasted this code into a new project and it is working for me. What does your urls.py look like? Is it possible you are sending your dash url to the index view? Here is the quick urls.py that I wrote to get this up and running:

    from django.conf.urls.defaults import *
    import views
    
    urlpatterns = patterns('',
        (r'^index/', views.index),
        (r'^dash/', views.dash),
    )
    

    When you view dash.html in your browser (through whatever URL you want to be tied to the dash view), how do you know that it is extending base.html if you do not see any of code that is specific to dash.html?

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The
i got an object with contents of html markup in it, for example: string
I have thousands of HTML files to process using Groovy/Java and I need to

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.