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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:05:36+00:00 2026-05-27T12:05:36+00:00

I have a base.html template with sitewide tags for charset, google-site-verification, stylesheets, js…. I

  • 0

I have a base.html template with sitewide tags for charset, google-site-verification, stylesheets, js…. I also need to set up blocks for page specific title tags and meta descriptions.

I am wondering, should I set up a {% block head %} in my base.html and in my inherited template mix tags in that block, or should i set up specific blocks such as {% block meta %} and {% block title %} so that the tags appear in their proper places when Django renders to html.

Does this make sense? If I view source with all the tags mixed in one {%block head %} things are a bit out of order, but if I add specific blocks for each tag they are in order but use much more code…?

  • 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-27T12:05:36+00:00Added an answer on May 27, 2026 at 12:05 pm

    I normally have three blocks. Those three have covered all my and my colleague’s needs in the last 1.5 year 🙂

    • A block for css.

    • A block for javascript.

    • A block called “head-extras”. Often you want to do something special on a page-by-page basis like adding a link element that points at your rss feed. Or some inline javascript snippet. With this block, you allow these corner cases in a clear way.

    In templates that extend the base template, you can use {{ super }} in the css and javascript blocks to get the “parent’s” list and extend it with your own.

    I also have a head block around the whole thing for those few cases where you just want to override everything in the head 🙂

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

Sidebar

Related Questions

i have template base.html and some children templates. I don't know how to set
I have a base.html template that contains a list of links. Example: <div id=sidebar1>
At the moment, I have a base HTML template file. When ever I want
I have a Dwoo template - in example base.html and there is an array
I have a base template in Django and several html files that are children
I have 3 Django templates: base.html <title>{% block title %} SITE NAME {% endblock
I have a base template file (base.html) and every other template extends to it
I have a template, base.html , which is used in several other templates for
I need help with e-mail templates. I have an html template with three embedded
New to Django so sorry if this is trivial I have a base.html template

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.