Codebase list django-markupfield / e2eb281
Import django-markupfield_1.4.1.orig.tar.gz Michael Fladischer 7 years ago
8 changed file(s) with 51 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
0 1.4.1 - 6 October 2016
1 ======================
2 - compatibility tweaks for Django 1.9 and 1.10
3
04 1.4.0 - 17 December 2015
15 =========================
26 - bugfixes for Django 1.9
00 Metadata-Version: 1.1
11 Name: django-markupfield
2 Version: 1.4.0
2 Version: 1.4.1
33 Summary: Custom Django field for easy use of markup in text fields
44 Home-page: http://github.com/jamesturk/django-markupfield/
55 Author: James Turk
3434 Requirements
3535 ------------
3636
37 Requires Django >= 1.7 and Python 2.7 or 3.4+
38
39 (1.3 is the last release to officially support Django 1.4 or Python 3.3)
37 Requires Django >= 1.8 and Python 2.7 or 3.4+
38
39 (1.3.x is the last release to officially support Django 1.4 or Python 3.3)
4040
4141 Settings
4242 ========
145145 ('wiki', my_wiki_render_func)
146146 )
147147 MarkupField(markup_choices=CUSTOM_RENDERERS)
148
149 .. note::
150 When using ``markdown``, be sure to use ``markdown.markdown`` and not
151 the ``markdown.Markdown`` class, the class requires an explicit ``reset``
152 to function properly in some cases. (See [issue #40](https://github.com/jamesturk/django-markupfield/issues/40)
153 for details.)
154
148155
149156 Accessing a MarkupField on a model
150157 ----------------------------------
2626 Requirements
2727 ------------
2828
29 Requires Django >= 1.7 and Python 2.7 or 3.4+
29 Requires Django >= 1.8 and Python 2.7 or 3.4+
3030
31 (1.3 is the last release to officially support Django 1.4 or Python 3.3)
31 (1.3.x is the last release to officially support Django 1.4 or Python 3.3)
3232
3333 Settings
3434 ========
138138 )
139139 MarkupField(markup_choices=CUSTOM_RENDERERS)
140140
141 .. note::
142 When using ``markdown``, be sure to use ``markdown.markdown`` and not
143 the ``markdown.Markdown`` class, the class requires an explicit ``reset``
144 to function properly in some cases. (See [issue #40](https://github.com/jamesturk/django-markupfield/issues/40)
145 for details.)
146
147
141148 Accessing a MarkupField on a model
142149 ----------------------------------
143150
00 Metadata-Version: 1.1
11 Name: django-markupfield
2 Version: 1.4.0
2 Version: 1.4.1
33 Summary: Custom Django field for easy use of markup in text fields
44 Home-page: http://github.com/jamesturk/django-markupfield/
55 Author: James Turk
3434 Requirements
3535 ------------
3636
37 Requires Django >= 1.7 and Python 2.7 or 3.4+
38
39 (1.3 is the last release to officially support Django 1.4 or Python 3.3)
37 Requires Django >= 1.8 and Python 2.7 or 3.4+
38
39 (1.3.x is the last release to officially support Django 1.4 or Python 3.3)
4040
4141 Settings
4242 ========
145145 ('wiki', my_wiki_render_func)
146146 )
147147 MarkupField(markup_choices=CUSTOM_RENDERERS)
148
149 .. note::
150 When using ``markdown``, be sure to use ``markdown.markdown`` and not
151 the ``markdown.Markdown`` class, the class requires an explicit ``reset``
152 to function properly in some cases. (See [issue #40](https://github.com/jamesturk/django-markupfield/issues/40)
153 for details.)
154
148155
149156 Accessing a MarkupField on a model
150157 ----------------------------------
0 {"is_release": false, "git_version": "13efc7b"}
0 {"is_release": true, "git_version": "452d421"}
0 __version__ = '1.4.0'
0 __version__ = '1.4.1'
11
22 import json
33
4 import django
45 from django.test import TestCase
56 from django.core import serializers
67 from django.utils.encoding import smart_text
233234 MarkupTextarea))
234235
235236 def test_markuptextarea_render(self):
237 if django.VERSION < (1, 10):
238 expected = ('<textarea id="id_normal_field" rows="10" cols="40" '
239 'name="normal_field">**normal**</textarea>'
240 )
241 else:
242 expected = ('<textarea id="id_normal_field" required rows="10" cols="40" '
243 'name="normal_field">**normal**</textarea>'
244 )
236245 a = Article(normal_field='**normal**',
237246 normal_field_markup_type='markdown',
238247 default_field='**default**',
240249 markup_choices_field_markup_type='nomarkup')
241250 a.save()
242251 af = ArticleForm(instance=a)
243 self.assertHTMLEqual(
244 smart_text(af['normal_field']),
245 '<textarea id="id_normal_field" rows="10" cols="40" '
246 'name="normal_field">**normal**</textarea>'
247 )
252 self.assertHTMLEqual(smart_text(af['normal_field']), expected)
248253
249254 def test_no_markup_type_field_if_set(self):
250255 """ensure that a field with non-editable markup_type set does not
280285 from django.contrib import admin
281286 ma = admin.ModelAdmin(Post, admin.site)
282287 self.assertTrue(isinstance(ma.formfield_for_dbfield(
283 Post._meta.get_field('body')).widget, AdminMarkupTextareaWidget))
288 Post._meta.get_field('body'), request=None).widget,
289 AdminMarkupTextareaWidget,
290 ))
284291
285292
286293 class MarkupFieldFormSaveTests(TestCase):
33
44 setup(
55 name='django-markupfield',
6 version="1.4.0",
6 version="1.4.1",
77 package_dir={'markupfield': 'markupfield'},
88 packages=['markupfield', 'markupfield.tests'],
99 package_data={'markupfield': ['locale/*/*/*']},