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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:01:49+00:00 2026-05-30T08:01:49+00:00

How do I disable flymake when I’m working on Django templates? Flymake is great

  • 0

How do I disable flymake when I’m working on Django templates?

Flymake is great for editing python files, but is really giving me problems with django templates. For instance, the following template throws no errors, though the syntax highlighting doesn’t work for the template tags:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>{% block title %}Page title{% endblock %}</title>
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>

<body>
{% block content %}
  <p>… Your HTML content here …</p>
{% endblock %}
</body>
</html>

However, the following template is riddled with font-lock for flymake errors:

{% extends base.html %}

{% block content %}
<h1>Welcome!</h1>
{% endblock %}

Hovering over the errors with a mouse reveals that flymake is complaing about “Text not allowed”.

I’ve followed each solution in this related question, but none of them disable flymake for html buffers. I even tried renaming all my template files to end in .djhtml instead of .html, but flymake was still active after re-visiting the files. I did change the auto-mode list to apply django-html-mode to .djhtml files, so maybe the issue lies there.

UPDATE: I’ve found that switching to html-mode doesn’t have this issue, since I’ve implemented the previously mentioned solutions. However, if I switch to nxml-mode or django-html-mode (what I’d like to use), flymake starts up again and tells me it is:

Using schema /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.93/etc/schema/xhtml.rnc

Emacs24 Carbon on Snow Leopard.

GNU Emacs 24.0.93.1 (i386-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2012-02-21 on hook
  • 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-30T08:01:51+00:00Added an answer on May 30, 2026 at 8:01 am

    The django wiki lists several options for working with emacs, but doesn’t offer a whole lot of guidance on particular strengths and weaknesses of each mode.

    The workaround I’m using at the moment involves using the django-html-mumamo-mode instead of django-mode. Here’s what I’ve figured out on my quest to set up emacs with django.

    Bear in mind, some of these observations might change as these packages are developed.

    pony-mode

    Looks promising, but the documentation isn’t complete, and syntax highlighting in templates didn’t work for me. This is what I was really after, but others might enjoy the other features that are baked-in.

    django-html-mumamo-mode

    This comes bundled with nXhtml. There aren’t any snippets included, but snippets can be found with Google, or imported from a Textmate bundle with yasnippet. Speaking of which, this mode conflicts with the yasnippet-bundle provided through ELPA, so be sure to follow the development trunk to avoid having to restart emacs everytime you trigger a snippet. BTW, syntax highlight is great, and you might like the generic web development features that are a part of nXhtml.

    django-mode

    Syntax highighting and jumping to tags, some snippets included; however, django-mode doesn’t play nice with flymake, which I think is because it is derived from nxml-mode. django-modeis no longer under development, nor is nxml-mode from what I can gather. django-html-mumamo-mode doesn’t suffer from this flymake issue, since nXhtml includes really nice support for flymake out of the box.

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

Sidebar

Related Questions

Details: Only disable after user clicks the submit button, but before the posting back
I need to disable web files caching for 1 tab in Chrome. is there
I want to disable viewstate for my entire site, but on some pages I
How do you disable autocomplete in the major browsers for a specific input (or
I'm trying to disable a bunch of controls with JavaScript (so that they post
I need to enable/disable completely network interfaces from a script in Windows XP. I'm
I need to disable specific keys (Ctrl and Backspace) in Internet Explorer 6. Is
Is it possible to disable a trigger for a batch of commands and then
I generaly disable viewstate for my ASP.net controls unless I explicitly know I am
When I disable ViewState for the page. It does not allow any other control

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.