mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-10 22:03:09 +00:00
dummy pep8
This commit is contained in:
parent
b6e3afa199
commit
e98d260e74
4 changed files with 25 additions and 21 deletions
|
|
@ -4,6 +4,7 @@ __copyright__ = '2014-2016 Artur Barseghyan'
|
|||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
__all__ = ('default_app_config', 'UID',)
|
||||
|
||||
default_app_config = 'fobi.contrib.plugins.form_elements.test.dummy.apps.Config'
|
||||
default_app_config = 'fobi.contrib.plugins.form_elements.test.' \
|
||||
'dummy.apps.Config'
|
||||
|
||||
UID = 'dummy'
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ try:
|
|||
from django.apps import AppConfig
|
||||
|
||||
class Config(AppConfig):
|
||||
"""Config."""
|
||||
|
||||
name = 'fobi.contrib.plugins.form_elements.test.dummy'
|
||||
label = 'fobi_contrib_plugins_form_elements_test_dummy'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
__title__ = 'fobi.contrib.plugins.form_elements.test.dummy.fobi_form_elements'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2016 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
__all__ = ('DummyPlugin',)
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
from django.utils.translation import ugettext, ugettext_lazy as _
|
||||
|
|
@ -15,26 +9,33 @@ from fobi.helpers import safe_text
|
|||
|
||||
from . import UID
|
||||
|
||||
__title__ = 'fobi.contrib.plugins.form_elements.test.dummy.fobi_form_elements'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2016 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
__all__ = ('DummyPlugin',)
|
||||
|
||||
|
||||
class DummyPlugin(FormElementPlugin):
|
||||
"""
|
||||
Dummy plugin.
|
||||
"""
|
||||
"""Dummy plugin."""
|
||||
|
||||
uid = UID
|
||||
name = _("Dummy")
|
||||
group = _("Testing")
|
||||
|
||||
def post_processor(self):
|
||||
"""
|
||||
"""Post process data.
|
||||
|
||||
Always the same.
|
||||
"""
|
||||
self.data.name = "{0}_{1}".format(self.uid, uuid4())
|
||||
|
||||
def get_form_field_instances(self, request=None):
|
||||
"""
|
||||
Get form field instances.
|
||||
"""
|
||||
"""Get form field instances."""
|
||||
kwargs = {
|
||||
'initial': "<p>{0}</p>".format(safe_text(ugettext("Dummy content"))),
|
||||
'initial': "<p>{0}</p>".format(
|
||||
safe_text(ugettext("Dummy content"))
|
||||
),
|
||||
'required': False,
|
||||
'label': '',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
from fobi.base import FormElementPluginWidget
|
||||
|
||||
from . import UID
|
||||
|
||||
__title__ = 'fobi.contrib.plugins.form_elements.test.dummy.widgets'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2016 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
__all__ = ('BaseDummyPluginWidget',)
|
||||
|
||||
from fobi.base import FormElementPluginWidget
|
||||
|
||||
from . import UID
|
||||
|
||||
class BaseDummyPluginWidget(FormElementPluginWidget):
|
||||
"""
|
||||
Base dummy form element plugin widget.
|
||||
"""
|
||||
"""Base dummy form element plugin widget."""
|
||||
|
||||
plugin_uid = UID
|
||||
|
|
|
|||
Loading…
Reference in a new issue