I am going over the documentation for using django-markdown2 in Project1, and I don't know what is the best way to:
-'Place django_markdown2 somewhere in your PYTHONPATH.'
https://github.com/svetlyak40wt/django-markdown2
I am using forms to pass the variable 'content' to read the .md modules.
class CreatePageForm(forms.Form):
title = forms.CharField(max_length=50,
widget=forms.TextInput(
attrs={"class": 'content',
"placeholder": "Type title",
}))
content = forms.CharField(widget=forms.Textarea(
attrs={"class": 'content',
"placeholder": "Type content",
'rows': 20,
'cols': 80}))
this is what I have in the template:
{% extends "encyclopedia/layout.html" %}
{% load md2 %}
{% block title %}
{{ title }}
{% endblock %}
{% block body %}
<div class="content-markdown">
{{ content|markdown }}
</div>
<br>
<a href="{% url 'edit' title %}">Edit</a> <br>
{% endblock %}
I need to know how I can place django_markdown2 in my PYTHONPATH and make it work with the forms I created, if it is possible how it should be done