prepare 0.4.7; fix broken imports in CAPTCHA in ReCAPTCHA plugins; temporary left out the cloneable column from dashboard templates; add more readme files to example project sub packages; documentation updates; updated the licensing information about 3rd party packages

This commit is contained in:
Artur Barseghyan 2014-12-24 01:49:42 +01:00
parent 3239e39bf6
commit 7657171e7a
17 changed files with 217 additions and 68 deletions

View file

@ -15,6 +15,14 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.
0.4.7
-------------------------------------
2012-12-24
- Temporary left out the "cloneable" column from the dashboard templates.
- Fixed broken imports in CAPTCHA plugin.
- Fixed broken imports in ReCAPTCHA plugin.
0.4.6
-------------------------------------
2012-12-23

View file

@ -3,6 +3,30 @@ Licenses
==============================
Below information about third-party packages used in the project is presented.
Bootstrap3
==============================
http://getbootstrap.com/
Licensing information:
- Apache license 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
django-autoslug
==============================
https://bitbucket.org/neithere/django-autoslug
Licensing information:
- LGPL 3 (https://www.gnu.org/licenses/lgpl.html)
easy-thumbnails
==============================
https://github.com/SmileyChris/easy-thumbnails
Licensing information:
- BSD (http://opensource.org/licenses/BSD-3-Clause)
Font-awesome
==============================
http://fontawesome.io/
@ -13,13 +37,13 @@ Licensing information:
- SIL OFL 1.1 (http://scripts.sil.org/OFL)
- MIT (http://opensource.org/licenses/mit-license.html)
Bootstrap3
Foundation 5
==============================
http://getbootstrap.com/
http://foundation.zurb.com/
Licensing information:
- Apache license 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
- MIT (http://opensource.org/licenses/mit-license.html)
jQuery Colorbox
==============================
@ -53,3 +77,53 @@ https://github.com/pmcelhaney/jQuery-Slugify-Plugin
Licensing information:
- BSD (https://github.com/pmcelhaney/jQuery-Slugify-Plugin/blob/master/LICENSE).
ordereddict
==============================
https://pypi.python.org/pypi/ordereddict
Licensing information:
- MIT (http://opensource.org/licenses/mit-license.html)
Pillow
==============================
http://python-pillow.github.io/
Licensing information:
- Python Imaging Library license (http://www.pythonware.com/products/pil/)
Requests
==============================
https://python-requests.org
Licensing information:
- MIT (http://opensource.org/licenses/mit-license.html)
Six
==============================
https://bitbucket.org/gutworth/six/
Licensing information:
- Apache 2.0 (http://opensource.org/licenses/Apache-2.0)
Unidecode
==============================
https://pypi.python.org/pypi/Unidecode
Licensing information:
- GPL 2.0 (http://www.gnu.org/licenses/gpl-2.0.html)
vishap
==============================
https://pypi.python.org/pypi/vishap
Licensing information:
- GPL 2.0 (http://www.gnu.org/licenses/gpl-2.0.html)
- LGPL 2.1 (https://www.gnu.org/licenses/lgpl-2.1.html)

View file

@ -0,0 +1,5 @@
=====================================
Example project for fobi.contrib.apps.mezzanine_integration
=====================================
Mezzanine integration example project for
``fobi.contrib.apps.mezzanine_integration``.

View file

@ -31,7 +31,7 @@ tox
#django-registration-redux>=1.1
#docutils==0.11
#ipdb==0.8
#ipython==1.1.0
#ipython==2.3.0
#ordereddict==1.1
# Selenium shall always be upgraded
#selenium

View file

@ -0,0 +1,9 @@
=====================================
Example app
=====================================
Gemeral purpose example app that:
- Shows how to make a form callback.
- Contains a sample endpoint for testing the HTTP repost form handler plugin.
- Contains a management command for creating a test form data (to be used
in tests).

View file

@ -0,0 +1,4 @@
=====================================
Example app
=====================================
Example app that shows how to override a theme.

View file

@ -0,0 +1,12 @@
==============================================================
FeinCMS Page package for fobi.contrib.apps.feincms_integration
==============================================================
FeinCMS Page package files.
- admin
- migrations
- models
- static files
Templates are located `here
<https://github.com/barseghyanartur/django-fobi/tree/stable/examples/simple/templates/page>`_.

View file

@ -8,7 +8,7 @@ try:
except Exception as e:
pass
RECAPTCHA_PUBLIC_KEY = ''
RECAPTCHA_PRIVATE_KEY = ''
#RECAPTCHA_PUBLIC_KEY = ''
#RECAPTCHA_PRIVATE_KEY = ''
RECAPTCHA_USE_SSL = True
#FOBI_DEFAULT_THEME = 'simple'

View file

@ -1,3 +1,7 @@
============================
FeinCMS page templates
============================
================================================================
FeinCMS page templates for fobi.contrib.apps.feincms_integration
================================================================
FeinCMS Page package templates.
Models, admin part and static files are located `here
<https://github.com/barseghyanartur/django-fobi/tree/stable/examples/simple/page>`_.

View file

@ -58,7 +58,7 @@ for static_dir in static_dirs:
for locale_dir in locale_dirs:
locale_files += [os.path.join(locale_dir, f) for f in os.listdir(locale_dir)]
version = '0.4.6'
version = '0.4.7'
install_requires = [
'Pillow>=2.0.0',

View file

@ -1,6 +1,6 @@
__title__ = 'django-fobi'
__version__ = '0.4.6'
__build__ = 0x000015
__version__ = '0.4.7'
__build__ = 0x000016
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = 'Copyright (c) 2014 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'

View file

@ -14,36 +14,49 @@ DJANGO_RECAPTCHA_INSTALLED = False
DJANGO_SIMPLE_CAPTCHA_INSTALLED = False
try:
import pip
installed_packages = pip.get_installed_distributions()
for installed_package in installed_packages:
if "django-recaptcha" == str(installed_package.key):
DJANGO_RECAPTCHA_INSTALLED = True
from captcha.fields import CaptchaField, CaptchaTextInput
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
except ImportError as e:
# Logging original exception
logger.error(e)
# Trying to identify the problem
try:
import pip
installed_packages = pip.get_installed_distributions()
for installed_package in installed_packages:
if "django-recaptcha" == str(installed_package.key):
DJANGO_RECAPTCHA_INSTALLED = True
logger.error(
"You have installed the `django-recaptcha` in your "
"environment. At the moment you can't have both "
"`django-recaptcha` and `django-simple-captcha` installed "
"alongside due to app name collision (captcha). Remove "
"both packages using pip uninstall and reinstall the "
"`django-simple-captcha` if you want to make use of the "
"`fobi.contrib.plugins.form_elements.security.captcha` "
"package."
)
if "django-simple-captcha" == str(installed_package.key):
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
if DJANGO_SIMPLE_CAPTCHA_INSTALLED and not DJANGO_RECAPTCHA_INSTALLED:
logger.error(
"You have installed the `django-recaptcha` in your "
"environment. At the moment you can't have both "
"`django-recaptcha` and `django-simple-captcha` installed "
"alongside due to app name collision (captcha). Remove "
"both packages using pip uninstall and reinstall the "
"You have installed the `django-simple-captcha` in your "
"environment, but imports seem to be broken. Remove "
"the package using pip uninstall and reinstall the "
"`django-simple-captcha` if you want to make use of the "
"`fobi.contrib.plugins.form_elements.security.captcha` "
"package."
)
if "django-simple-captcha" == str(installed_package.key):
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
except ImportError:
try:
from captcha.fields import CaptchaField, CaptchaTextInput
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
except ImportError as e:
DJANGO_SIMPLE_CAPTCHA_INSTALLED = False
except ImportError:
logger.error(
"{0}{1}".format(str(e), "; Likely you didn't yet install the"
"`django-simple-captcha` package. Note, that at "
"the moment you can't have both `django-recaptcha` "
"and `django-simple-captcha` installed alongside "
"due to app name collision (captcha).")
"Likely you didn't yet install the"
"`django-simple-captcha` package. Note, that at "
"the moment you can't have both `django-recaptcha` "
"and `django-simple-captcha` installed alongside "
"due to app name collision (captcha)."
)
from fobi.base import FormElementPlugin, form_element_plugin_registry, get_theme

View file

@ -58,6 +58,12 @@ packages. That limitation is likely to be solved in future in the
``django-recaptcha`` package. Until then, you should choose either one or
another, but not both on the same time.
If you happen to see errors like "Input error: k: Format of site key was
invalid", make sure to have defined (and filled in properly) the
``RECAPTCHA_PUBLIC_KEY`` and ``RECAPTCHA_PRIVATE_KEY`` in your settnings.py.
See the `following <https://github.com/praekelt/django-recaptcha/issues/32>`_
thread for more information.
Usage
===============================================
Note, that unlike most of the other form element plugins, default

View file

@ -14,38 +14,52 @@ DJANGO_RECAPTCHA_INSTALLED = False
DJANGO_SIMPLE_CAPTCHA_INSTALLED = False
try:
import pip
installed_packages = pip.get_installed_distributions()
for installed_package in installed_packages:
if "django-simple-captcha" == str(installed_package.key):
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptcha as ReCaptchaWidget
DJANGO_RECAPTCHA_INSTALLED = True
except ImportError as e:
# Logging original exception
logger.error(e)
# Trying to identify the problem
try:
import pip
installed_packages = pip.get_installed_distributions()
for installed_package in installed_packages:
if "django-simple-captcha" == str(installed_package.key):
DJANGO_SIMPLE_CAPTCHA_INSTALLED = True
logger.error(
"You have installed the `django-simple-captcha` in your "
"environment. At the moment you can't have both "
"`django-simple-captcha` and `django-recaptcha` installed "
"alongside due to app name collision (captcha). Remove "
"both packages using pip uninstall and reinstall the"
"`django-recaptcha` if you want to make use of the "
"`fobi.contrib.plugins.form_elements.security.recaptcha` "
"package."
)
if "django-recaptcha" == str(installed_package.key):
DJANGO_RECAPTCHA_INSTALLED = True
if DJANGO_RECAPTCHA_INSTALLED and not DJANGO_SIMPLE_CAPTCHA_INSTALLED:
logger.error(
"You have installed the `django-simple-captcha` in your "
"environment. At the moment you can't have both "
"`django-simple-captcha` and `django-recaptcha` installed "
"alongside due to app name collision (captcha). Remove "
"both packages using pip uninstall and reinstall the"
"You have installed the `django-recaptcha` in your "
"environment, but imports seem to be broken. Remove "
"the package using pip uninstall and reinstall the "
"`django-recaptcha` if you want to make use of the "
"`fobi.contrib.plugins.form_elements.security.recaptcha` "
"package."
)
if "django-recaptcha" == str(installed_package.key):
DJANGO_RECAPTCHA_INSTALLED = True
except ImportError:
try:
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptcha as ReCaptchaWidget
DJANGO_RECAPTCHA_INSTALLED = True
except ImportError as e:
DJANGO_RECAPTCHA_INSTALLED = False
logger.error(
"{0}{1}".format(str(e), "; Likely you didn't yet install the"
"`django-simple-captcha` package. Note, that at "
"the moment you can't have both `django-recaptcha` "
"and `django-simple-captcha` installed alongside "
"due to app name collision (captcha).")
)
except ImportError:
DJANGO_RECAPTCHA_INSTALLED = False
logger.error(
"; Likely you didn't yet install the"
"`django-simple-captcha` package. Note, that at "
"the moment you can't have both `django-recaptcha` "
"and `django-simple-captcha` installed alongside "
"due to app name collision (captcha)."
)
from fobi.base import FormElementPlugin, form_element_plugin_registry, get_theme
from fobi.contrib.plugins.form_elements.security.recaptcha import UID

View file

@ -28,7 +28,7 @@
<tr>
<th>{% trans "Form" %}</th>
<th>{% trans "Is public" %}</th>
<th>{% trans "Is cloneable" %}</th>
{#<th>{% trans "Is cloneable" %}</th>#}
<th>{% trans "Actions" %}</th>
</tr>
</thead>
@ -37,7 +37,7 @@
<tr>
<td><a href="{% url 'fobi.view_form_entry' form_entry.slug %}">{{ form_entry.name }}</a></td>
<td>{{ form_entry.is_public }}</td>
<td>{{ form_entry.is_cloneable }}</td>
{#<td>{{ form_entry.is_cloneable }}</td>#}
<td>
<ul class="inline-list">
<li><a href="{% url 'fobi.edit_form_entry' form_entry.pk %}"><span class="fi-page-edit"></span> {% trans "Edit" %}</a></li>

View file

@ -49,12 +49,12 @@
</div>
<div class="clear"></div>
</th>
<th>
{% comment %}<th>
<div class="text">
<span>{% trans "Cloneable?" %}</span>
</div>
<div class="clear"></div>
</th>
</th>{% endcomment %}
<th>
<div class="text">
<span>{% trans "Actions" %}</span>
@ -68,7 +68,7 @@
<tr class="{% if forloop.counter|divisibleby:2 %}row2{% else %}row1{% endif %}">
<th><a href="{% url 'fobi.view_form_entry' form_entry.slug %}">{{ form_entry.name }}</a></th>
<td>{{ form_entry.is_public }}</td>
<td>{{ form_entry.is_cloneable }}</td>
{#<td>{{ form_entry.is_cloneable }}</td>#}
<td>
<ul class="list-inline">
<li>

View file

@ -29,7 +29,7 @@
<tr>
<th>{% trans "Form" %}</th>
<th>{% trans "Is public" %}</th>
<th>{% trans "Is cloneable" %}</th>
{#<th>{% trans "Is cloneable" %}</th>#}
<th>{% trans "Actions" %}</th>
</tr>
</thead>
@ -38,7 +38,7 @@
<tr>
<td><a href="{% url 'fobi.view_form_entry' form_entry.slug %}">{{ form_entry.name }}</a></td>
<td>{{ form_entry.is_public }}</td>
<td>{{ form_entry.is_cloneable }}</td>
{#<td>{{ form_entry.is_cloneable }}</td>#}
<td>
<ul class="list-inline">
<li>