diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..520dcef7 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,3 @@ +[MASTER] +ignore=migrations,south_migrations + diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 53fcdd2c..1d163c1a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -30,10 +30,6 @@ break your code. Two additional arguments have been added to the `submit_plugin_form_data` method of the form element plugins. If you have written custom form element plugins - update your code. -Note, that this release contain minor backwards incompatible changes, that -may break your existing code (your data is left intact). If you have written -custom form element plugins you should update your code! - - Added `form_entry_elements` and `kwargs` to the `submit_plugin_form_data` method of the form element plugins. Make sure to update your custom plugins if you have written any. diff --git a/README.rst b/README.rst index 5355547b..f4088ff9 100644 --- a/README.rst +++ b/README.rst @@ -1084,7 +1084,7 @@ Required imports. CALLBACK_FORM_VALID_BEFORE_SUBMIT_PLUGIN_FORM_DATA, CALLBACK_FORM_VALID, CALLBACK_FORM_VALID_AFTER_FORM_HANDLERS, CALLBACK_FORM_INVALID - ) + ) from fobi.base import FormCallback, form_callback_registry Define and register the callback diff --git a/docs/index.rst b/docs/index.rst index 724a1dbb..ea2bc6d4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1084,7 +1084,7 @@ Required imports. CALLBACK_FORM_VALID_BEFORE_SUBMIT_PLUGIN_FORM_DATA, CALLBACK_FORM_VALID, CALLBACK_FORM_VALID_AFTER_FORM_HANDLERS, CALLBACK_FORM_INVALID - ) + ) from fobi.base import FormCallback, form_callback_registry Define and register the callback diff --git a/examples/simple/settings/local_settings.example b/examples/simple/settings/local_settings.example index 6287e98c..c597749b 100644 --- a/examples/simple/settings/local_settings.example +++ b/examples/simple/settings/local_settings.example @@ -1,9 +1,20 @@ import os -PROJECT_DIR = lambda base : os.path.abspath(os.path.join(os.path.dirname(__file__), base).replace('\\','/')) + + +def gettext(s): + return s + + +def project_dir(base): + return os.path.abspath( + os.path.join(os.path.dirname(__file__), base).replace('\\', '/') + ) + + +PROJECT_DIR = project_dir DEBUG = True DEBUG_TOOLBAR = not True -TEMPLATE_DEBUG = not True DEBUG_TEMPLATE = True @@ -15,19 +26,24 @@ os.environ.setdefault( DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': PROJECT_DIR('../../db/example.db'), # Or path to database file if using sqlite3. + # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'ENGINE': 'django.db.backends.sqlite3', + # Or path to database file if using sqlite3. + 'NAME': PROJECT_DIR('../../db/example.db'), # The following settings are not used with sqlite3: 'USER': '', 'PASSWORD': '', - 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. - 'PORT': '', # Set to empty string for default. + # Empty for localhost through domain sockets or '127.0.0.1' for + # localhost through TCP. + 'HOST': '', + # Set to empty string for default. + 'PORT': '', } } INTERNAL_IPS = ('127.0.0.1',) -ALLOWED_HOSTS = ['*',] +ALLOWED_HOSTS = ['*'] EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' EMAIL_FILE_PATH = PROJECT_DIR('../../tmp') @@ -36,7 +52,19 @@ DEFAULT_FROM_EMAIL = '' FOBI_DEBUG = True FOBI_RESTRICT_PLUGIN_ACCESS = False -#FOBI_DEFAULT_THEME = 'foundation5' +# FOBI_DEFAULT_THEME = 'foundation5' WAIT_BETWEEN_TEST_STEPS = 0 FOBI_WAIT_AT_TEST_END = 0 + +MAILCHIMP_API_KEY = 'your-mailchimp-api-key' + +RECAPTCHA_PUBLIC_KEY = 'your-recaptcha-public-key' +RECAPTCHA_PRIVATE_KEY = 'your-recaptcha-private-key' + +FIREFOX_BIN_PATH = '/usr/lib/firefox47/firefox' + +os.environ.setdefault( + 'FOBI_SOURCE_PATH', + '/home/user/repose/django-fobi/src' +) diff --git a/scripts/pylint.sh b/scripts/pylint.sh new file mode 100755 index 00000000..06edc8b7 --- /dev/null +++ b/scripts/pylint.sh @@ -0,0 +1 @@ +pylint src/fobi/