M docs/plugins.rst => docs/plugins.rst +1 -1
@@ 5,7 5,7 @@ Add/remove the following to your ``settings.INSTALLED_APPS`` to
enable/disable the core plugins:
- ``'wiki.plugins.attachments.apps.AttachmentsConfig'``
-- ``'wiki.plugins.editsection.apps.AttachmentsConfig'``
+- ``'wiki.plugins.editsection.apps.EditSectionConfig'``
- ``'wiki.plugins.globalhistory.apps.GlobalHistoryConfig'``
- ``'wiki.plugins.help.apps.HelpConfig'``
- ``'wiki.plugins.images.apps.ImagesConfig'``
M docs/settings.rst => docs/settings.rst +1 -1
@@ 17,7 17,7 @@ Plugin attachments
:members:
Plugin editSection
--------------
+------------------
.. automodule:: wiki.plugins.editsection.settings
:members:
M src/wiki/forms.py => src/wiki/forms.py +1 -2
@@ 265,8 265,7 @@ class EditForm(forms.Form, SpamProtectionMixin):
if provided_content:
self.presumed_revision = self.initial_revision.id
else:
- newdata['content'] = simple_merge(
- content, data.get('content', ""))
+ newdata['content'] = simple_merge(content, data.get('content', ""))
newdata['title'] = current_revision.title
kwargs['data'] = newdata
else:
M src/wiki/plugins/editsection/__init__.py => src/wiki/plugins/editsection/__init__.py +3 -0
@@ 0,0 1,3 @@
+from __future__ import unicode_literals
+
+default_app_config = 'wiki.plugins.editsection.apps.EditSectionConfig'
A src/wiki/plugins/editsection/apps.py => src/wiki/plugins/editsection/apps.py +10 -0
@@ 0,0 1,10 @@
+from __future__ import unicode_literals
+
+from django.apps import AppConfig
+from django.utils.translation import ugettext_lazy as _
+
+
+class EditSectionConfig(AppConfig):
+ name = 'wiki.plugins.editsection'
+ verbose_name = _("Wiki edit section")
+ label = 'wiki_editsection'
M src/wiki/plugins/editsection/markdown_extensions.py => src/wiki/plugins/editsection/markdown_extensions.py +3 -3
@@ 24,10 24,10 @@ class EditSectionExtension(Extension):
def get_header_id(header):
- id = ''.join(w[0] for w in re.findall("\w+", header))
- if not len(id):
+ header_id = ''.join(w[0] for w in re.findall("\w+", header))
+ if not len(header_id):
return '_'
- return id
+ return header_id
class EditSectionProcessor(Treeprocessor):
M src/wiki/plugins/editsection/views.py => src/wiki/plugins/editsection/views.py +1 -2
@@ 119,8 119,7 @@ class EditSection(EditView):
kwargs['content'] = request.session.get('editSection_content')
self.orig_section = kwargs.get('content')
- return super(EditSection, self).dispatch(
- request, article, *args, **kwargs)
+ return super(EditSection, self).dispatch(request, article, *args, **kwargs)
def form_valid(self, form):
super(EditSection, self).form_valid(form)
M tests/settings.py => tests/settings.py +1 -1
@@ 32,7 32,7 @@ INSTALLED_APPS = [
'sorl.thumbnail',
'wiki.apps.WikiConfig',
'wiki.plugins.attachments.apps.AttachmentsConfig',
- 'wiki.plugins.editsection.apps.AttachmentsConfig',
+ 'wiki.plugins.editsection.apps.EditSectionConfig',
'wiki.plugins.notifications.apps.NotificationsConfig',
'wiki.plugins.images.apps.ImagesConfig',
'wiki.plugins.macros.apps.MacrosConfig',