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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:17:17+00:00 2026-05-13T15:17:17+00:00

For a new project we’re writing documentation about the Django template system. We use

  • 0

For a new project we’re writing documentation about the Django template system. We use Django for the documentation project itself too, so Django picks up all our example variables in the sample code and tries to render them. The only way we found to get around this is to use {% templatetag %}, but that makes our code really unreadable. Is there maybe a way to make Django ignore all template variables in a specific section?

  • 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-13T15:17:18+00:00Added an answer on May 13, 2026 at 3:17 pm

    Due to limitations in the Django template lexer (like being a kludgy hack), this is impossible. However, if you are willing to put your example code in separate files, you can use the ssi tag:

    {% ssi /path/to/my/code/examples/example01.html %}
    

    And it won’t parse the file, just include it verbatim. However, this also has limitations in that you can’t use variables in the include path (i.e. if you move template locations, you have to rewrite or at least find-and-replace your template files), and you have to put the include path (i.e. /path/to/my/code/examples) in the ALLOWED_INCLUDE_ROOTS setting in your settings.py. (See http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ssi.)

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

Sidebar

Related Questions

We are bringing a new project in house and whereas previously all our work
My new project is targeting an embedded ARM processor. I have a build system
Starting a new project and would like to use one of the MVC framworks.
When starting a new project that required the use of membership providers I found
In a new project, we decide to use Gooogle Web Font. It pretty easy
We just started a new project in Java EE in our office and i
I'm starting a new project and I want to use NHibernate 3.2. I know
I'm starting a new project and although I'm used to MySQL, I'm worried about
Every new project that the client registers the system creates a folder to store
Our new project requires us to incorporate an Atypon adapter (ISAPI Filter) to be

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.