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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:58:36+00:00 2026-06-10T16:58:36+00:00

I needed Markdown syntax for my blog. I decided to use python-markdown2 library .

  • 0

I needed Markdown syntax for my blog. I decided to use python-markdown2 library. I follow TDD process so I created tests in which I imported Markdown library and it worked. Then all I needed was to convert some of the output so that all tests pass. I think that it’s more like a presentation logic, so I created template tag in which I want to import library and… that as far as I got. Problem is that I can’t import that library! I debugged for hours and I still can’t find a reason why.

Few facts:

  1. It’s imported in tests.py before (so it does exist),
  2. Without using external library, template tag works fine;

The precise error message:

TemplateSyntaxError at /article/1/foo-bar/
'cheese' is not a valid tag library: ImportError raised loading blog.templatetags.cheese: cannot import name markdown

Here’s templatetags/cheese.py:

from django import template
import markdown2

register = template.Library()


@register.filter
def eggs(value):
    return value

Here’s template:

{% load cheese %}

P.S. If needed, full error and all 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-06-10T16:58:37+00:00Added an answer on June 10, 2026 at 4:58 pm

    The traceback shows something that isn’t present in your github repo: there is a file in the templatetags directory called markdown2.py, which is imported when the cheese file does import markdown2. Remove this file, and it should find the right one.

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

Sidebar

Related Questions

I needed to use the std::is_assignable type traits, which happens not to be available
I needed to check the memory stats of objects I use in python. I
I needed to use a java code in python to reduce, so I chose
Needed to write a server text file as the output of a business process
I needed to built Boost.Python to work for version 3.2 and I keep running
I've been finding that a lot of Github projects use Markdown . I originally
I needed a virtual environment with all the global packages included. I created one,
We needed to monitor all processes Registry calls/File Sytem calls/Process creations in the system
I needed to make a console application using nettiers class libraries. I created a
I needed some guidance on how to use FlexUnit 4 within Flash Builder, 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.