mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-19 18:01:52 +00:00
prepare 0.4.33; add checkbox select multiple plugin; minor improvements of foundation 5 theme; initial config for tox tests; general code clean-up
This commit is contained in:
parent
60c904e7ad
commit
b6dc3185c4
31 changed files with 235 additions and 116 deletions
|
|
@ -15,13 +15,31 @@ are used for versioning (schema follows below):
|
|||
0.3.4 to 0.4).
|
||||
- All backwards incompatible changes are mentioned in this document.
|
||||
|
||||
0.4.33
|
||||
0.5
|
||||
-------------------------------------
|
||||
yyyy-mm-ddd (not yet released).
|
||||
|
||||
- Checkbox select multiple field added
|
||||
`fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/checkbox_select_multiple>`_.
|
||||
This release contains minor backwards incompatible changes, related to the
|
||||
change of the name of the "simple" theme into "django_admin_style" theme.
|
||||
|
||||
- Mailchimp support.
|
||||
- Kube framework integration (theme).
|
||||
- PureCSS framework integration (theme).
|
||||
- Skeleton framework integration (theme).
|
||||
- Baseline framework integration (theme).
|
||||
- Amazium framework integration (theme).
|
||||
- The "simple" theme has been renamed to "django_admin_style".
|
||||
|
||||
0.4.33
|
||||
-------------------------------------
|
||||
2015-03-25
|
||||
|
||||
- `Checkbox select multiple
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/checkbox_select_multiple>`_
|
||||
field added.
|
||||
- Minor improvements (styling) in the Foundation 5 theme.
|
||||
- Initial configuration for tox tests.
|
||||
- Clean up requirements (for example setups and tests).
|
||||
|
||||
0.4.32
|
||||
-------------------------------------
|
||||
|
|
@ -52,18 +70,24 @@ yyyy-mm-ddd (not yet released).
|
|||
-------------------------------------
|
||||
2015-03-20
|
||||
|
||||
- Decimal field added `fobi.contrib.plugins.form_elements.fields.decimal
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/decimal>`_.
|
||||
- Float field added `fobi.contrib.plugins.form_elements.fields.float
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/float>`_.
|
||||
- Slug field added `fobi.contrib.plugins.form_elements.fields.slug
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/slug>`_.
|
||||
- IP address field added `fobi.contrib.plugins.form_elements.fields.ip_address
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/ip_address>`_.
|
||||
- Null boolean field `fobi.contrib.plugins.form_elements.fields.null_boolean
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/null_boolean>`_.
|
||||
- Time field added `fobi.contrib.plugins.form_elements.fields.time
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/time>`_.
|
||||
- `Decimal
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/decimal>`_
|
||||
field added.
|
||||
- `Float
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/float>`_
|
||||
field added.
|
||||
- `Slug
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/slug>`_
|
||||
field added .
|
||||
- `IP address
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/ip_address>`_
|
||||
field added.
|
||||
- `Null boolean
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/null_boolean>`_
|
||||
field added.
|
||||
- `Time
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/master/src/fobi/contrib/plugins/form_elements/fields/time>`_
|
||||
field added.
|
||||
- From now on using `simplejson` package in favour of `json`, since it can
|
||||
handle decimal data.
|
||||
- Minor improvements of the date plugins (`datetime`, `date`).
|
||||
|
|
|
|||
|
|
@ -52,20 +52,30 @@ Add ``fobi`` core and the plugins to the ``INSTALLED_APPS`` of the your
|
|||
.. code-block:: python
|
||||
|
||||
'fobi.contrib.plugins.form_elements.fields.boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.date',
|
||||
'fobi.contrib.plugins.form_elements.fields.date_drop_down',
|
||||
'fobi.contrib.plugins.form_elements.fields.datetime',
|
||||
'fobi.contrib.plugins.form_elements.fields.decimal',
|
||||
'fobi.contrib.plugins.form_elements.fields.email',
|
||||
'fobi.contrib.plugins.form_elements.fields.file',
|
||||
'fobi.contrib.plugins.form_elements.fields.float',
|
||||
'fobi.contrib.plugins.form_elements.fields.hidden',
|
||||
'fobi.contrib.plugins.form_elements.fields.input',
|
||||
'fobi.contrib.plugins.form_elements.fields.integer',
|
||||
'fobi.contrib.plugins.form_elements.fields.ip_address',
|
||||
'fobi.contrib.plugins.form_elements.fields.null_boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.password',
|
||||
'fobi.contrib.plugins.form_elements.fields.radio',
|
||||
'fobi.contrib.plugins.form_elements.fields.regex',
|
||||
'fobi.contrib.plugins.form_elements.fields.select',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_model_object',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
|
||||
'fobi.contrib.plugins.form_elements.fields.slug',
|
||||
'fobi.contrib.plugins.form_elements.fields.text',
|
||||
'fobi.contrib.plugins.form_elements.fields.textarea',
|
||||
'fobi.contrib.plugins.form_elements.fields.time',
|
||||
'fobi.contrib.plugins.form_elements.fields.url',
|
||||
|
||||
4. The presentational form elements (images, texts, videos).
|
||||
|
|
@ -81,9 +91,9 @@ Add ``fobi`` core and the plugins to the ``INSTALLED_APPS`` of the your
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
'fobi.contrib.plugins.form_handlers.db_store',
|
||||
'fobi.contrib.plugins.form_handlers.http_repost',
|
||||
'fobi.contrib.plugins.form_handlers.mail',
|
||||
'fobi.contrib.plugins.form_handlers.db_store',
|
||||
'fobi.contrib.plugins.form_handlers.http_repost',
|
||||
'fobi.contrib.plugins.form_handlers.mail',
|
||||
|
||||
Putting all together, you would have something like this.
|
||||
|
||||
|
|
@ -99,20 +109,30 @@ Putting all together, you would have something like this.
|
|||
|
||||
# Form field plugins
|
||||
'fobi.contrib.plugins.form_elements.fields.boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.date',
|
||||
'fobi.contrib.plugins.form_elements.fields.date_drop_down',
|
||||
'fobi.contrib.plugins.form_elements.fields.datetime',
|
||||
'fobi.contrib.plugins.form_elements.fields.decimal',
|
||||
'fobi.contrib.plugins.form_elements.fields.email',
|
||||
'fobi.contrib.plugins.form_elements.fields.file',
|
||||
'fobi.contrib.plugins.form_elements.fields.float',
|
||||
'fobi.contrib.plugins.form_elements.fields.hidden',
|
||||
'fobi.contrib.plugins.form_elements.fields.input',
|
||||
'fobi.contrib.plugins.form_elements.fields.integer',
|
||||
'fobi.contrib.plugins.form_elements.fields.ip_address',
|
||||
'fobi.contrib.plugins.form_elements.fields.null_boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.password',
|
||||
'fobi.contrib.plugins.form_elements.fields.radio',
|
||||
'fobi.contrib.plugins.form_elements.fields.regex',
|
||||
'fobi.contrib.plugins.form_elements.fields.select',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_model_object',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
|
||||
'fobi.contrib.plugins.form_elements.fields.slug',
|
||||
'fobi.contrib.plugins.form_elements.fields.text',
|
||||
'fobi.contrib.plugins.form_elements.fields.textarea',
|
||||
'fobi.contrib.plugins.form_elements.fields.time',
|
||||
'fobi.contrib.plugins.form_elements.fields.url',
|
||||
|
||||
# Form element plugins
|
||||
|
|
|
|||
13
README.rst
13
README.rst
|
|
@ -200,20 +200,30 @@ Or latest stable version from BitBucket:
|
|||
|
||||
# Fobi form elements - fields
|
||||
'fobi.contrib.plugins.form_elements.fields.boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.date',
|
||||
'fobi.contrib.plugins.form_elements.fields.date_drop_down',
|
||||
'fobi.contrib.plugins.form_elements.fields.datetime',
|
||||
'fobi.contrib.plugins.form_elements.fields.decimal',
|
||||
'fobi.contrib.plugins.form_elements.fields.email',
|
||||
'fobi.contrib.plugins.form_elements.fields.file',
|
||||
'fobi.contrib.plugins.form_elements.fields.float',
|
||||
'fobi.contrib.plugins.form_elements.fields.hidden',
|
||||
'fobi.contrib.plugins.form_elements.fields.input',
|
||||
'fobi.contrib.plugins.form_elements.fields.integer',
|
||||
'fobi.contrib.plugins.form_elements.fields.ip_address',
|
||||
'fobi.contrib.plugins.form_elements.fields.null_boolean',
|
||||
'fobi.contrib.plugins.form_elements.fields.password',
|
||||
'fobi.contrib.plugins.form_elements.fields.radio',
|
||||
'fobi.contrib.plugins.form_elements.fields.regex',
|
||||
'fobi.contrib.plugins.form_elements.fields.select',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_model_object',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
|
||||
'fobi.contrib.plugins.form_elements.fields.slug',
|
||||
'fobi.contrib.plugins.form_elements.fields.text',
|
||||
'fobi.contrib.plugins.form_elements.fields.textarea',
|
||||
'fobi.contrib.plugins.form_elements.fields.time',
|
||||
'fobi.contrib.plugins.form_elements.fields.url',
|
||||
|
||||
# Fobi form elements - content elements
|
||||
|
|
@ -1410,6 +1420,7 @@ need additional processing. There are 3 behaviours taken into consideration:
|
|||
The following plugins have been made configurable in such a way, that
|
||||
developers can choose the desired behaviour in projects' settings:
|
||||
|
||||
- ``FOBI_FORM_ELEMENT_CHECKBOX_SELECT_MULTIPLE_SUBMIT_VALUE_AS``
|
||||
- ``FOBI_FORM_ELEMENT_RADIO_SUBMIT_VALUE_AS``
|
||||
- ``FOBI_FORM_ELEMENT_SELECT_SUBMIT_VALUE_AS``
|
||||
- ``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_SUBMIT_VALUE_AS``
|
||||
|
|
@ -1418,6 +1429,8 @@ developers can choose the desired behaviour in projects' settings:
|
|||
|
||||
See the README.rst in each of the following plugins for more information.
|
||||
|
||||
- `Checkbox select multiple (multiple checkboxes)
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/stable/src/fobi/contrib/plugins/form_elements/fields/radio/>`__
|
||||
- `Radio select (radio button)
|
||||
<https://github.com/barseghyanartur/django-fobi/tree/stable/src/fobi/contrib/plugins/form_elements/fields/radio/>`__
|
||||
- `Select (drop-down)
|
||||
|
|
|
|||
|
|
@ -296,6 +296,9 @@ Should haves
|
|||
value (repr).
|
||||
+ Document the `SUBMIT_VALUE_AS` in main documentation and mention in the
|
||||
readme of all appropriate plugins.
|
||||
+ In ``db_store` plugin, at the moment if labels are not unique, some data
|
||||
loss happens. Either, make the labels unique in a single form or avoid data
|
||||
loss in some other way.
|
||||
- Fix the issue with `db_store` plugin and `allow_multiple` property (if
|
||||
set to True tests fail).
|
||||
- Fix the issue with `initial` for `select_multiple` plugin. At the moment,
|
||||
|
|
@ -324,9 +327,6 @@ Should haves
|
|||
"barseghyanartur/test-form-1" instead of "test-form-1-N").
|
||||
- Once the form ordering has been changed, show a message and warn if user
|
||||
is about to leave the page without saving the changes.
|
||||
- In ``db_store` plugin, at the moment if labels are not unique, some data
|
||||
loss happens. Either, make the labels unique in a single form or avoid data
|
||||
loss in some other way.
|
||||
- Make it possible to create fieldsets (implement as containers).
|
||||
- Think of adding hooks so that custom actions are possible without template
|
||||
changes (for example, add a new import app for importing the forms from
|
||||
|
|
@ -348,6 +348,8 @@ Could haves
|
|||
+ Finish select multiple model objects plugin (issue with processing form data
|
||||
on form submit).
|
||||
+ Make a django theme for jQuery UI.
|
||||
- Think of delegating the form rendering completely to third-party library
|
||||
like `django-crispy-forms`.
|
||||
- Make it possible to use something else than Django's ORM (django-mongoengine,
|
||||
SQLAlchemy).
|
||||
- Make it possible for themes to override the ``fobi.forms.FormEntryForm``
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ Jinja2
|
|||
MarkupSafe
|
||||
#MySQL-python
|
||||
Sphinx
|
||||
South>=0.8.2
|
||||
django-admin-tools==0.5.2
|
||||
django-autoslug>=1.7.1
|
||||
django-debug-toolbar>=0.11.0
|
||||
django-localeurl>=2.0.2
|
||||
django-registration-redux>=1.1
|
||||
docutils
|
||||
ipdb
|
||||
|
|
@ -4,8 +4,11 @@ Jinja2
|
|||
MarkupSafe
|
||||
#MySQL-python
|
||||
Sphinx
|
||||
South>=0.8.2
|
||||
django-admin-tools==0.5.2
|
||||
django-autoslug>=1.7.1
|
||||
django-debug-toolbar>=0.11.0
|
||||
django-localeurl>=2.0.2
|
||||
django-registration-redux>=1.1
|
||||
docutils
|
||||
ipdb
|
||||
|
|
@ -4,8 +4,10 @@ Jinja2
|
|||
MarkupSafe
|
||||
MySQL-python
|
||||
Sphinx
|
||||
django-admin-tools>=0.5.2
|
||||
django-autoslug==1.7.1
|
||||
django-debug-toolbar==0.11.0
|
||||
django-localeurl>=2.0.2
|
||||
django-registration-redux>=1.1
|
||||
docutils
|
||||
ipdb
|
||||
|
|
@ -4,8 +4,10 @@ Jinja2
|
|||
MarkupSafe
|
||||
MySQL-python
|
||||
Sphinx
|
||||
django-admin-tools>=0.5.2
|
||||
django-autoslug==1.7.1
|
||||
django-debug-toolbar==0.11.0
|
||||
django-localeurl>=2.0.2
|
||||
django-registration-redux>=1.1
|
||||
docutils
|
||||
ipdb
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#workon fobi
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django17_captcha --traceback -v 3
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django_1_7_captcha --traceback -v 3
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#workon fobi
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django17_feincms --traceback -v 3
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django_1_7_feincms --traceback -v 3
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#workon fobi
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#workon fobi
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django18 --traceback -v 3
|
||||
./manage.py runserver 0.0.0.0:8000 --traceback -v 3 --settings=settings_bootstrap3_theme_django_1_8 --traceback -v 3
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
|
||||
#cd ..
|
||||
pip install -r examples/requirements_django15.txt
|
||||
pip install -r examples/requirements_django_1_5.txt
|
||||
python setup.py install
|
||||
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
|
||||
mkdir -p examples/media/fobi_plugins/file
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
|
||||
#cd ..
|
||||
pip install -r examples\requirements_django16.txt
|
||||
pip install -r examples\requirements_django_1_6.txt
|
||||
python setup.py install
|
||||
mkdir examples\logs
|
||||
mkdir examples\db
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
|
||||
#cd ..
|
||||
pip install -r examples/requirements_django16.txt
|
||||
pip install -r examples/requirements_django_1_6.txt
|
||||
python setup.py install
|
||||
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
|
||||
mkdir -p examples/media/fobi_plugins/file
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
|
||||
#cd ..
|
||||
pip install -r examples/requirements_django17.txt
|
||||
pip install -r examples/requirements_django_1_7.txt
|
||||
python setup.py install
|
||||
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
|
||||
mkdir -p examples/media/fobi_plugins/file
|
||||
python examples/simple/manage.py collectstatic --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py syncdb --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py migrate --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py fobi_create_test_data --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py collectstatic --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py syncdb --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py migrate --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py fobi_create_test_data --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
#cd scripts
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
#pip install -r examples/requirements.txt --allow-all-external --allow-unverified django-admin-tools
|
||||
#cd ..
|
||||
pip uninstall south -y
|
||||
pip install -r examples/requirements_django18.txt
|
||||
pip install -r examples/requirements_django_1_8.txt
|
||||
python setup.py install
|
||||
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
|
||||
mkdir -p examples/media/fobi_plugins/file
|
||||
python examples/simple/manage.py collectstatic --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py syncdb --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py migrate --noinput --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py fobi_create_test_data --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py collectstatic --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py syncdb --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py migrate --noinput --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
python examples/simple/manage.py fobi_create_test_data --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
#cd scripts
|
||||
|
|
@ -2,5 +2,5 @@ reset
|
|||
./scripts/uninstall.sh
|
||||
./scripts/install_django_1_7.sh
|
||||
#cd ..
|
||||
python examples/simple/manage.py test fobi --settings=settings_bootstrap3_theme_django17 --traceback -v 3
|
||||
python examples/simple/manage.py test fobi --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
#cd scripts
|
||||
|
|
@ -2,5 +2,5 @@ reset
|
|||
./scripts/uninstall.sh
|
||||
./scripts/install_django_1_8.sh
|
||||
#cd ..
|
||||
python examples/simple/manage.py test fobi --settings=settings_bootstrap3_theme_django18 --traceback -v 3
|
||||
python examples/simple/manage.py test fobi --settings=settings_bootstrap3_theme_django_1_8 --traceback -v 3
|
||||
#cd scripts
|
||||
2
setup.py
2
setup.py
|
|
@ -63,7 +63,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.32'
|
||||
version = '0.4.33'
|
||||
|
||||
install_requires = [
|
||||
'Pillow>=2.0.0',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
__title__ = 'django-fobi'
|
||||
__version__ = '0.4.32'
|
||||
__build__ = 0x000035
|
||||
__version__ = '0.4.33'
|
||||
__build__ = 0x000036
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2015 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
__title__ = 'fobi.contrib.plugins.form_elements.fields.select_multiple.settings'
|
||||
__title__ = 'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.settings'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = 'Copyright (c) 2014-2015 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
__all__ = ('SUBMIT_VALUE_AS',)
|
||||
|
||||
from fobi.helpers import validate_submit_value_as
|
||||
from fobi.contrib.plugins.form_elements.fields.select_multiple.conf import (
|
||||
get_setting
|
||||
)
|
||||
from fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple.conf \
|
||||
import get_setting
|
||||
|
||||
SUBMIT_VALUE_AS = get_setting('SUBMIT_VALUE_AS')
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,29 @@
|
|||
</label>
|
||||
|
||||
<div class="large-10 columns">
|
||||
{{ field }}
|
||||
{% get_form_field_type field as form_field_type %}
|
||||
|
||||
{% if form_field_type.is_radio %}
|
||||
{% for choice_value, choice_label in field.field.choices %}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="{{ field.html_name }}" value="{{ choice_value }}"{% if field.value == choice_value %}checked{% endif %}>
|
||||
{{ choice_label }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% elif form_field_type.is_checkbox_multiple %}
|
||||
{% for choice_value, choice_label in field.field.choices %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{ field.html_name }}_{{ forloop.index0 }}" value="{{ choice_value }}"{% if field.value == choice_value %}checked{% endif %}>
|
||||
{{ choice_label }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<span class="error">
|
||||
|
|
|
|||
|
|
@ -38,6 +38,15 @@
|
|||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% elif form_field_type.is_checkbox_multiple %}
|
||||
{% for choice_value, choice_label in field.field.choices %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{ field.html_name }}_{{ forloop.index0 }}" value="{{ choice_value }}"{% if field.value == choice_value %}checked{% endif %}>
|
||||
{{ choice_label }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -306,6 +306,9 @@ class GetFormFieldTypeNode(Node):
|
|||
if isinstance(field.field.widget, forms.CheckboxInput):
|
||||
properties.append('is_checkbox')
|
||||
|
||||
if isinstance(field.field.widget, forms.CheckboxSelectMultiple):
|
||||
properties.append('is_checkbox_multiple')
|
||||
|
||||
if isinstance(field.field.widget, forms.RadioSelect):
|
||||
properties.append('is_radio')
|
||||
|
||||
|
|
|
|||
151
tox.ini
151
tox.ini
|
|
@ -1,75 +1,92 @@
|
|||
[tox]
|
||||
envlist =
|
||||
py26_django15,
|
||||
py27_django15,
|
||||
py33_django15,
|
||||
# py26_django16,
|
||||
# py27_django16,
|
||||
# py33_django16
|
||||
py26-1.5.x,
|
||||
py27-1.5.x,
|
||||
py33-1.5.x,
|
||||
py26-1.6.x,
|
||||
py27-1.6.x,
|
||||
py33-1.6.x,
|
||||
py27-1.7.x,
|
||||
py33-1.7.x,
|
||||
py27-1.8.x,
|
||||
py33-1.8.x,
|
||||
|
||||
[testenv:py26_django15]
|
||||
deps=unittest2
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
[testenv]
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py27_django15]
|
||||
deps=unittest2
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
|
||||
[testenv:py33_django15]
|
||||
basepython=/opt/python3.3/bin/python3.3
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
# pip uninstall django-localeurl -y
|
||||
pip install -r examples/requirements3.txt --upgrade
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
[testenv:py26-1.5.x]
|
||||
basepython = python2.6
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_5.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py26_django16]
|
||||
deps=unittest2
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
pip install Django==1.6
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
[testenv:py27-1.5.x]
|
||||
basepython = python2.7
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_5.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py27_django16]
|
||||
deps=unittest2
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
pip install Django==1.6
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
[testenv:py33-1.5.x]
|
||||
basepython = python3.3
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_5.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py33_django16]
|
||||
basepython=/opt/python3.3/bin/python3.3
|
||||
commands=
|
||||
# pip uninstall django-fobi -y
|
||||
pip install -r examples/requirements.txt --upgrade
|
||||
# pip uninstall django-localeurl -y
|
||||
pip install -r examples/requirements3.txt --upgrade
|
||||
pip install Django==1.6
|
||||
{envpython} setup.py install
|
||||
{envpython} examples/simple/manage.py syncdb --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py migrate --noinput --traceback -v 3
|
||||
{envpython} examples/simple/manage.py test fobi --traceback -v 3
|
||||
|
||||
[testenv:py26-1.6.x]
|
||||
basepython = python2.6
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_6.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py27-1.6.x]
|
||||
basepython = python2.7
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_6.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
[testenv:py33-1.6.x]
|
||||
basepython = python3.3
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_6.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings --traceback -v 3
|
||||
|
||||
|
||||
[testenv:py26-1.7.x]
|
||||
basepython = python2.6
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_7.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
|
||||
[testenv:py27-1.7.x]
|
||||
basepython = python2.7
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_7.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
|
||||
[testenv:py33-1.7.x]
|
||||
basepython = python3.3
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_7.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_7 --traceback -v 3
|
||||
|
||||
|
||||
[testenv:py26-1.8.x]
|
||||
basepython = python2.6
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_8.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_8 --traceback -v 3
|
||||
|
||||
[testenv:py27-1.8.x]
|
||||
basepython = python2.7
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_8.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_8 --traceback -v 3
|
||||
|
||||
[testenv:py33-1.8.x]
|
||||
basepython = python3.3
|
||||
deps=-r{toxinidir}/examples/requirements_django_1_8.txt
|
||||
commands =
|
||||
{envpython} examples/simple/manage.py test {posargs:fobi} --settings=settings_bootstrap3_theme_django_1_8 --traceback -v 3
|
||||
|
|
|
|||
Loading…
Reference in a new issue