Skip to content

Commit

Permalink
Updated requirements in readme and remove markdown warning
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyomahony committed Sep 13, 2019
1 parent b691141 commit 49cff22
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ Add [Stack Overflow's "Pagedown" Markdown editor](https://github.c

## Requirements

The widget has been vastly simplified so that it's easier to drop-into your projects and easier to customise. Version >= 2.0.0 requires Django 2.1.0 or above.
Version >= 2.0.0 of `django-pagedown` requires Django 2.1.0 or above (previous versions should support Django all the way back to around 1.1).

## Installation

1. Get the code: `pip install django-pagedown`
2. Add `pagedown.apps.PagedownConfig` to your `INSTALLED_APPS`
3. Collect the static files: `python manage.py collectstatic`

## Markdown Safety

Remember that this library doesn't render your markdown for you outside of the admin widget nor does it do any internal sanitization. Markdown can accept any valid HTML so you have to be careful and make sure you are rendering the output of any untrusted input safely (with [`django-markdown-deux`](https://github.com/trentm/django-markdown-deux) for example), otherwise you could have users embedding scripts in your pagedown text areas

## Usage

The widget can be used both inside the django admin or independendly.
Expand Down Expand Up @@ -140,7 +136,7 @@ class MyNewWidget(PagedownWidget):
js = ('custom/javascript.js',)
```

## Rendering Markdown In Your Template
## Rendering Markdown

`contrib.markdown` was [depreciated in Django 1.5](https://code.djangoproject.com/ticket/18054) meaning you can no longer use the `markdown` filter in your template by default.

Expand Down

0 comments on commit 49cff22

Please sign in to comment.