Skip to content

Commit 7c44e00

Browse files
authored
Merge pull request #178 from baseplate-admin/patch-1
Update README.md
2 parents e51c4ea + aaeb268 commit 7c44e00

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $ pip install martor
4949

5050
**2.** Don't forget to add `'martor'` to your `'INSTALLED_APPS'` setting _(without migrations)_.
5151

52-
```
52+
```python
5353
# settings.py
5454
INSTALLED_APPS = [
5555
....
@@ -60,7 +60,7 @@ INSTALLED_APPS = [
6060

6161
**3.** Add url pattern to your `urls.py.`
6262

63-
```
63+
```python
6464
# urls.py
6565
# django >= 2.0
6666
urlpatterns = [
@@ -88,7 +88,7 @@ urlpatterns = [
8888
Please register your application at https://api.imgur.com/oauth2/addclient
8989
to get `IMGUR_CLIENT_ID` and `IMGUR_API_KEY`.
9090

91-
```
91+
```python
9292
# Choices are: "semantic", "bootstrap"
9393
MARTOR_THEME = 'bootstrap'
9494

@@ -166,7 +166,7 @@ ALLOWED_URL_SCHEMES = [
166166

167167
Check this setting is not set else csrf will not be sent over ajax calls:
168168

169-
```
169+
```python
170170
CSRF_COOKIE_HTTPONLY = False
171171
```
172172

@@ -176,7 +176,7 @@ CSRF_COOKIE_HTTPONLY = False
176176

177177
#### Model
178178

179-
```
179+
```python
180180
from django.db import models
181181
from martor.models import MartorField
182182

@@ -187,7 +187,7 @@ class Post(models.Model):
187187

188188
#### Form
189189

190-
```
190+
```python
191191
from django import forms
192192
from martor.fields import MartorFormField
193193

@@ -198,7 +198,7 @@ class PostForm(forms.Form):
198198

199199
#### Admin
200200

201-
```
201+
```python
202202
from django.db import models
203203
from django.contrib import admin
204204

@@ -219,7 +219,7 @@ admin.site.register(YourModel, YourModelAdmin)
219219

220220
Simply safely parse markdown content as html ouput by loading templatetags from `martor/templatetags/martortags.py`.
221221

222-
```
222+
```html
223223
{% load martortags %}
224224
{{ field_name|safe_markdown }}
225225

@@ -232,7 +232,7 @@ Don't miss to include the required css & js files before use.
232232
You can take a look at this folder [martor_demo/app/templates][14] for more details.
233233
The below example is a one of the way to implement it when you choose the `MARTOR_THEME = 'bootstrap'`:
234234

235-
```
235+
```html
236236
{% extends "bootstrap/base.html" %}
237237
{% load static %}
238238
{% load martortags %}
@@ -266,7 +266,7 @@ The below example is a one of the way to implement it when you choose the `MARTO
266266

267267
Different with *Template Renderer*, the *Template Editor Form* have more css & javascript dependencies.
268268

269-
```
269+
```html
270270
{% extends "bootstrap/base.html" %}
271271
{% load static %}
272272

0 commit comments

Comments
 (0)