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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:50:35+00:00 2026-06-15T21:50:35+00:00

Anybody successful on trying jinja2 template inheritance? The sample just work partially for me.

  • 0

Anybody successful on trying jinja2 template inheritance? The sample just work partially for me.

base.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    {% block head %}
    <link rel="stylesheet" href="style.css" />
    <title>{% block title %}{% endblock %} - My Webpage</title>
    {% endblock %}
</head>
<body>
    <div id="content">{% block content %}{% endblock %}</div>
    <div id="footer">
        {% block footer %}
        &copy; Copyright 2008 by <a href="http://domain.invalid/">you</a>.
        {% endblock %}
    </div>
</body>

index.html (child template)

{% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block head %}
    {{ super() }}
    <style type="text/css">
        .important { color: #336699; }
    </style>
{% endblock %}
{% block content %}
    <h1>Index</h1>
    <p class="important">
      Welcome on my awesome homepage.
    </p>
{% endblock %}

My output

enter image description here

My problem:
1. page title is “Index”. It should be “Index – Mypage”
2. No footer

Please help!!!!
For reference: I am using most updated google app engine, python 2.7, IDE is Visual studio 2012 + Python for Visual Studio, KAY framework (extended from django and jinja2)

views.py

def index(request):
    return render_to_response('myapp/index.html')
  • 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-15T21:50:37+00:00Added an answer on June 15, 2026 at 9:50 pm

    Jinja2 follows inheritance from your TEMPLATE_DIRS settings. I’m assuming that you have an incorrect path. Try:

    {% extends "myapp/base.html" %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run the Task-Android-sample given at Google Api Java Client I
I'm trying to send an HTML message while using SMTP authentication to Gmail in
Has anybody successfully integrated Clearcase with Teamcity (which advertises Clearcase support) to realize a
Has anybody ever successfully written code to extract data from a SharePoint 2007 list
Is anybody using OpenGLES2.0 shaders (GLSL) successfully for audio synthesis? I already use vDSP
I am using successfully the mobylette rails gem: https://github.com/tscolari/mobylette I was wondering if anybody
Anybody used Neural Network approaches for clustering data? Particularly ART Neural Network (Adaptive Resonance
Anybody knows if it is possible to get a javascript for/in loop from coffeescript?
Anybody knows how to get nic card name when I do ipconfig/all I can
anybody know how can I replace \ by \\ ? input string : Télephone

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.