Skip to content

Commit c193753

Browse files
committed
clean codes
1 parent 9631ce2 commit c193753

File tree

12 files changed

+31
-55
lines changed

12 files changed

+31
-55
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Features
3030
* Emoji ``:emoji_name:`` + Cheat sheets
3131
* Martor Commands Refference
3232
* Support Django Admin
33-
* Highlight ``pre``
3433
* Toolbar Buttons
34+
* Highlight ``pre``
3535

3636

3737
Preview
@@ -141,7 +141,7 @@ to get ``IMGUR_CLIENT_ID`` and ``IMGUR_API_KEY``.
141141

142142
# Markdown Extensions
143143
MARTOR_MARKDOWN_BASE_EMOJI_URL = 'https://assets-cdn.github.com/images/icons/emoji/' # default
144-
MARTOR_MARKDOWN_BASE_MENTION_URL = 'https://python.web.id/profile/' # default (change this)
144+
MARTOR_MARKDOWN_BASE_MENTION_URL = 'https://python.web.id/author/' # default (change this)
145145

146146
Check this setting is not set else csrf will not be sent over ajax calls:
147147

martor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
__VERSION__ = '1.2.3'
3+
__VERSION__ = '1.2.4'
44
__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55
__AUTHOR_EMAIL__ = '[email protected]'

martor/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@
6565
settings, 'MARTOR_MARKDOWN_BASE_EMOJI_URL', 'https://assets-cdn.github.com/images/icons/emoji/'
6666
)
6767
MARTOR_MARKDOWN_BASE_MENTION_URL = getattr(
68-
settings, 'MARTOR_MARKDOWN_BASE_MENTION_URL', 'https://websitedomain.com/profile/'
68+
settings, 'MARTOR_MARKDOWN_BASE_MENTION_URL', 'https://python.web.id/author/'
6969
)

martor/static/martor/css/martor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
box-sizing: content-box;
44
}
55
body.overflow {
6-
overflow: hidden;
6+
overflow: hidden!important;
77
}
88

99
/* Scroll Bar */

martor/static/martor/css/martor.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Name : Martor v1.2.1
2+
* Name : Martor v1.2.4
33
* Created by : Agus Makmun (Summon Agus)
44
* Release date : 18-Sep-2017
55
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

martor/static/martor/js/martor.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/templates/martor/editor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div class="main-martor main-martor-{{ field_name }}" data-field-name="{{ field_name }}">
33
<div class="section-martor">
44
<div class="ui top attached tabular pointing secondary menu tab-martor-menu">
5-
<a class="item active" data-tab="editor-tab-{{ field_name }}">{% trans "Editor" %}</a>
6-
<a class="item" data-tab="preview-tab-{{ field_name }}">{% trans "Preview" %}</a>
5+
<a class="item active" data-tab="editor-tab-{{ field_name }}"><i class="edit icon"></i> {% trans "Editor" %}</a>
6+
<a class="item" data-tab="preview-tab-{{ field_name }}"><i class="eye icon"></i>{% trans "Preview" %}</a>
77
{% include "martor/toolbar.html" %}
88
</div>
99
<div class="ui bottom attached tab segment active" data-tab="editor-tab-{{ field_name }}">

martor_demo/app/urls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from django.conf.urls import url
22

33
from app.views import (
4+
home_redirect_view,
45
simple_form_view,
56
post_form_view,
67
test_markdownify
78
)
89

910
urlpatterns = [
11+
url(r'^$', home_redirect_view, name='home_redirect'),
12+
13+
# basic form
1014
url(r'^simple-form/$', simple_form_view, name='simple_form'),
1115

1216
# require to logged in

martor_demo/app/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
from django.http import HttpResponse
2-
from django.shortcuts import render
2+
from django.shortcuts import render, redirect
33
from django.contrib.auth.decorators import login_required
44

55
from app.forms import (SimpleForm, PostForm)
66
from app.models import Post
77

88

9+
def home_redirect_view(request):
10+
return redirect('simple_form')
11+
12+
913
def simple_form_view(request):
1014
form = SimpleForm()
1115
context = {'form': form, 'title': 'Simple Form'}

0 commit comments

Comments
 (0)