django-knowledge icon indicating copy to clipboard operation
django-knowledge copied to clipboard

Django 1.6 breaks markup template tag library

Open robnewman opened this issue 10 years ago • 10 comments

Django 1.6 removes markup from the django.core feature set.

More information:

django.contrib.markup will be removed following an accelerated deprecation.

The solution is one of two things:

  1. (Not recommended, but useful as a patch) Use django-markup-deprecated. This allows you to keep the {% load markup %} template tag.
  2. (Recommended) Use django-markupfield where relevant in your models.

In my (currently unmerged) fork and commit of this project I added support for Textile. I am also going to fix this problem using the second approach above and commit to my fork.

robnewman avatar Nov 13 '13 17:11 robnewman

Thanks @robnewman! Let me know when your fork is ready!

bryanhelmig avatar Nov 13 '13 19:11 bryanhelmig

Any movement on this @robnewman ?

ScottEAdams avatar Dec 19 '13 00:12 ScottEAdams

@7wonders - Yeah fixed in my forked copy that you can get from my account. I've sent multiple pull requests but for some reason the owner doesn't want to merge them. Sorry I can't help more than that.

robnewman avatar Dec 19 '13 21:12 robnewman

Sorry guys, I don't fully understand the implications of merging this without sitting down and taking a look. @robnewman had you tested on 1.4, 1.5, 1.6?

I suppose this would be a good reason to have Travis CI running. :smile:

bryanhelmig avatar Dec 19 '13 21:12 bryanhelmig

@bryanhelmig - Tested on 1.5 and 1.6. Not 1.4. Personally I don't see why anything would break - you can view the changes made in the source, which are minimal. But you are the owner of the repo, so you make the call (and/or run the tests if you really want it backwards compatible to 1.4)

robnewman avatar Dec 19 '13 21:12 robnewman

Thanks @robnewman. I can't guarantee I'll merge anything during the holidays, if anyone is reading along and needs support for this, the forks are a good solution. I'll post an update when there is one.

bryanhelmig avatar Dec 19 '13 21:12 bryanhelmig

Im slightly confused @robnewman . I just tried your fork and its breaking due to the references to markup in the templates. I was under the impression that you was going to implement django-markupfield to kill that problem?

Also I saw this https://pypi.python.org/pypi/django-markitup which would maybe be even better as it would allow for removal of markup and to use any of the formats supported by markitup and even add an editor for those that might want it. Just a thought.

ScottEAdams avatar Dec 19 '13 23:12 ScottEAdams

@7wonders Ack - you are correct. Looks like I need to push again to my master. I have also significantly modified my version of django-knowledge where it uses Twitter-Bootstrap for the layout, and also supports tagging using Django's Taggit library, so (a) you can tag articles, and (b) you can use Taggit's similar_objects() method to show the most closely related django-knowledge articles in your knowledge base. I'm not going to be able to push those changes right now, but you can see them in action at my very customized version of django-knowledge

robnewman avatar Dec 20 '13 23:12 robnewman

@7wonders - If you need to get my fork running right now you can just remove that one line from thread.html that imports markup.

robnewman avatar Dec 20 '13 23:12 robnewman

@7wonders Okay, cleaned up the template and pushed to my master. Let me know if you still get that error - but on my issue list - Brian is not responsible for my fork. Thx.

robnewman avatar Dec 20 '13 23:12 robnewman