mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-05-09 22:04:47 +00:00
Added missing {{ form.media }}
This commit is contained in:
parent
cc5f65fc43
commit
61a64b0830
1 changed files with 11 additions and 2 deletions
13
README.md
13
README.md
|
|
@ -34,7 +34,7 @@ Example (side-by-side editor and preview using Bootstrap's grid system):
|
|||
```python
|
||||
#urls.py
|
||||
urlpatterns = [
|
||||
[...]
|
||||
[...]
|
||||
url(r'^markdownx/', include('markdownx.urls')),
|
||||
]
|
||||
```
|
||||
|
|
@ -57,11 +57,20 @@ Example (side-by-side editor and preview using Bootstrap's grid system):
|
|||
static/css/markdownx.css
|
||||
static/js/markdownx.js
|
||||
|
||||
1. Include the form's required media in the template using `{{ form.media }}`
|
||||
|
||||
```html
|
||||
<form method="POST" action="">{% csrf_token %}
|
||||
{% include "snippets/form.html" %}
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
{{ form.media }}
|
||||
```
|
||||
|
||||
1. Include *[jQuery](http://jquery.com)* and *[Marked](https://github.com/chjj/marked)* files
|
||||
|
||||
```html
|
||||
<head>
|
||||
[...]
|
||||
<script src="{{ STATIC_URL }}js/jquery.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/marked.js"></script>
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Reference in a new issue