Skip to main content

A custom form widget of Django for markdown

Project description

## Django MKEditor
A form widget that change the textfield style to the markdown.

![](mk.png)

## Installation
1. Get the code: `pip install mkeditor`
2. Add `mkedirot` to your `INSTALLED_APPS`


## Usage
1. In forms.py

```
from mkeditor.widgets import MarkdownWidget

class ArticleForm(forms.ModelForm):
class Meta:
widgets = {
'content': MarkdownWidget, # the content is model field
}
```

2. In admin.py

```
from .form import ArticleForm

class ArticleAdmin(admin.ModelAdmin):
form = ArticleForm

admin.site.register(Article, ArticleAdmin)
```

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mkeditor, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size mkeditor-0.1.tar.gz (1.3 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page