mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-10 22:03:09 +00:00
more on docs
This commit is contained in:
parent
d8217f88df
commit
a9d9028cb5
37 changed files with 743 additions and 745 deletions
2
src/fobi/contrib/plugins/form_elements/README.rst
Normal file
2
src/fobi/contrib/plugins/form_elements/README.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Form elements
|
||||
=============
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fobi.contrib.plugins.form_elements.fields.input
|
||||
===============================================
|
||||
-----------------------------------------------
|
||||
A generic input form field plugin. Makes use of the
|
||||
``django.forms.fields.Field`` and ``django.forms.widgets.Input``.
|
||||
Comes with a lot of options you likely won't use every day.
|
||||
|
|
@ -23,23 +23,23 @@ See `w3schools.com <http://www.w3schools.com/tags/tag_input.asp>`_ for further
|
|||
explanations.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.input`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.input`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.input',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.input',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
fobi.contrib.plugins.form_elements.fields.integer
|
||||
=================================================
|
||||
-------------------------------------------------
|
||||
A ``Fobi`` Integer form field plugin. Makes use of the
|
||||
``django.forms.fields.IntegerField`` and ``django.forms.widgets.NumberInput``
|
||||
(falling back to ``django.forms.widgets.TextInput`` for older Django
|
||||
versions).
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.integer`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.integer`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.integer',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.integer',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
fobi.contrib.plugins.form_elements.fields.ip_address
|
||||
====================================================
|
||||
----------------------------------------------------
|
||||
A ``Fobi`` Text form field plugin. Makes use of the
|
||||
``django.forms.fields.GenericIPAddressField`` and
|
||||
``django.forms.widgets.TextInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.ip_address`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.ip_address`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.ip_address',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.ip_address',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
fobi.contrib.plugins.form_elements.fields.null_boolean
|
||||
======================================================
|
||||
------------------------------------------------------
|
||||
A ``Fobi`` NullBoolean form field plugin. Makes use of the
|
||||
``django.forms.fields.NullBooleanField`` and
|
||||
``django.forms.widgets.NullBooleanSelect``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.null_boolean`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.null_boolean`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.null_boolean',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.null_boolean',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.fields.password
|
||||
==================================================
|
||||
--------------------------------------------------
|
||||
A ``Fobi`` Password form field plugin. Makes use of the
|
||||
``django.forms.fields.CharField`` and ``django.forms.widgets.PasswordInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.password`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.password`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.password',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.password',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
fobi.contrib.plugins.form_elements.fields.radio
|
||||
===============================================
|
||||
-----------------------------------------------
|
||||
A ``Fobi`` Radio form field plugin. Makes use of the
|
||||
``django.forms.fields.ChoiceField`` and ``django.forms.widgets.RadioSelect``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.radio`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.radio`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.radio',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.radio',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. By default, the submitted form value of `radio`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
(4) By default, the submitted form value of `radio`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_RADIO_SUBMIT_VALUE_AS`` assign one of the following
|
||||
values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_RADIO_SUBMIT_VALUE_AS`` assign one of the following
|
||||
values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
fobi.contrib.plugins.form_elements.fields.range_select
|
||||
======================================================
|
||||
------------------------------------------------------
|
||||
A ``Fobi`` RangeSelect form field plugin. Makes use of the
|
||||
``django.forms.fields.ChoiceField`` and ``django.forms.widgets.Select``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.range_select`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.range_select`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.range_select',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.range_select',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Ranges are specified within the given min/max values. The default values
|
||||
are:
|
||||
(4) Ranges are specified within the given min/max values. The default values
|
||||
are:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- INITIAL: 50
|
||||
- INITIAL_MAX_VALUE: 100
|
||||
- INITIAL_MIN_VALUE: 0
|
||||
- MIN_VALUE: 0
|
||||
- MAX_VALUE: 100
|
||||
- STEP: 1
|
||||
- INITIAL: 50
|
||||
- INITIAL_MAX_VALUE: 100
|
||||
- INITIAL_MIN_VALUE: 0
|
||||
- MIN_VALUE: 0
|
||||
- MAX_VALUE: 100
|
||||
- STEP: 1
|
||||
|
||||
However, you can override each of them in the settings of your project by
|
||||
prefixing correspondent names with `FOBI_FORM_ELEMENT_RANGE_SELECT_`:
|
||||
However, you can override each of them in the settings of your project by
|
||||
prefixing correspondent names with `FOBI_FORM_ELEMENT_RANGE_SELECT_`:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_STEP
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_INITIAL_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_RANGE_SELECT_STEP
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.fields.regex
|
||||
===============================================
|
||||
-----------------------------------------------
|
||||
A ``Fobi`` Text form field plugin. Makes use of the
|
||||
``django.forms.fields.RegexField`` and ``django.forms.widgets.TextInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.regex`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.regex`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.regex',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.regex',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,58 +1,58 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select
|
||||
================================================
|
||||
------------------------------------------------
|
||||
A ``Fobi`` Select form field plugin. Makes use of the
|
||||
``django.forms.fields.ChoiceField`` and ``django.forms.widgets.Select``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.select`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.select`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. By default, the submitted form value of `select`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
(4) By default, the submitted form value of `select`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_SUBMIT_VALUE_AS`` assign one of the following
|
||||
values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_SUBMIT_VALUE_AS`` assign one of the following
|
||||
values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
|
||||
Usage
|
||||
-----
|
||||
~~~~~
|
||||
You should be entering a single choice per line. Choice might
|
||||
consist of just a single value or value/label pair.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +1,52 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_model_object
|
||||
=============================================================
|
||||
-------------------------------------------------------------
|
||||
A ``Fobi`` Select Model Object form field plugin. Makes use of the
|
||||
``django.forms.models.ModelChoiceField`` and ``django.forms.widgets.Select``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.select_model_object`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.select_model_object`` to
|
||||
the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_model_object',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_model_object',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_model_object.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
(4) Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_model_object.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_FORM_ELEMENT_SELECT_MODEL_OBJECT_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
FOBI_FORM_ELEMENT_SELECT_MODEL_OBJECT_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
|
||||
5. By default, the submitted form value of `select_model_object` elements is
|
||||
`app_label.model_name.object_pk.object_repr`. However, that part of the
|
||||
behaviour has been made configurable. You can choose between the following
|
||||
options:
|
||||
(5) By default, the submitted form value of `select_model_object` elements is
|
||||
`app_label.model_name.object_pk.object_repr`. However, that part of the
|
||||
behaviour has been made configurable. You can choose between the following
|
||||
options:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
|
||||
Simply set the ``FOBI_FORM_ELEMENT_SELECT_MODEL_OBJECT_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
Simply set the ``FOBI_FORM_ELEMENT_SELECT_MODEL_OBJECT_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_mptt_model_object
|
||||
==================================================================
|
||||
------------------------------------------------------------------
|
||||
A ``Fobi`` Select MPTT Model Object form field plugin. Makes use of the
|
||||
``mptt.fields.TreeNodeChoiceField`` and ``django.forms.widgets.Select``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
Install `django-mptt`
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
#####################
|
||||
Taken from django-mptt `Getting started
|
||||
<http://django-mptt.github.io/django-mptt/tutorial.html#getting-started>`_.
|
||||
|
||||
|
|
@ -19,51 +19,51 @@ Taken from django-mptt `Getting started
|
|||
2. Add ``mptt`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
Install `select_mptt_model_object` plugin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1. Add ``mptt`` and
|
||||
``fobi.contrib.plugins.form_elements.fields.select_mptt_model_object``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
#########################################
|
||||
(1) Add ``mptt`` and
|
||||
``fobi.contrib.plugins.form_elements.fields.select_mptt_model_object``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'mptt',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_mptt_model_object',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'mptt',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_mptt_model_object',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
(4) Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_mptt_model_object.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_FORM_ELEMENT_SELECT_MPTT_MODEL_OBJECT_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
FOBI_FORM_ELEMENT_SELECT_MPTT_MODEL_OBJECT_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
|
||||
5. By default, the submitted form value of `select_mptt_model_object` elements
|
||||
is `app_label.model_name.object_pk.object_repr`. However, that part of the
|
||||
behaviour has been made configurable. You can choose between the following
|
||||
options:
|
||||
(5) By default, the submitted form value of `select_mptt_model_object` elements
|
||||
is `app_label.model_name.object_pk.object_repr`. However, that part of the
|
||||
behaviour has been made configurable. You can choose between the following
|
||||
options:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
|
||||
Simply set the ``FOBI_FORM_ELEMENT_SELECT_MPTT_MODEL_OBJECT_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
Simply set the ``FOBI_FORM_ELEMENT_SELECT_MPTT_MODEL_OBJECT_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
|
|
|
|||
|
|
@ -1,59 +1,59 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_multiple
|
||||
=========================================================
|
||||
---------------------------------------------------------
|
||||
A ``Fobi`` Select Multiple form field plugin. Makes use of the
|
||||
``django.forms.fields.MultipleChoiceField`` and
|
||||
``django.forms.widgets.SelectMultiple``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.select_multiple`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.select_multiple`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. By default, the submitted form value of `select_multiple`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
(4) By default, the submitted form value of `select_multiple`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_SUBMIT_VALUE_AS`` assign one of the
|
||||
following values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_SUBMIT_VALUE_AS`` assign one of the
|
||||
following values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
|
||||
Usage
|
||||
-----
|
||||
~~~~~
|
||||
You should be entering a single choice per line. Choice might
|
||||
consist of just a single value or value/label pair.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects
|
||||
=======================================================================
|
||||
-----------------------------------------------------------------------
|
||||
A ``Fobi`` Select Multiple Model Objects form field plugin. Makes use of the
|
||||
``django.forms.models.ModelMultipleChoiceField`` and
|
||||
``django.forms.widgets.SelectMultiple``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
(4) Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MODEL_OBJECTS_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MODEL_OBJECTS_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
|
||||
5. By default, the submitted form value of `select_multiple_model_objects`
|
||||
elements is `app_label.model_name.object_pk.object_repr`. However, that part
|
||||
of the behaviour has been made configurable. You can choose between the
|
||||
following options:
|
||||
(5) By default, the submitted form value of `select_multiple_model_objects`
|
||||
elements is `app_label.model_name.object_pk.object_repr`. However, that
|
||||
part of the behaviour has been made configurable. You can choose between
|
||||
the following options:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MODEL_OBJECTS_SUBMIT_VALUE_AS`` assign
|
||||
one of the following values: "val", "repr" or "mix" to get the desired
|
||||
behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MODEL_OBJECTS_SUBMIT_VALUE_AS`` assign
|
||||
one of the following values: "val", "repr" or "mix" to get the desired
|
||||
behaviour.
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects
|
||||
============================================================================
|
||||
----------------------------------------------------------------------------
|
||||
A ``Fobi`` Select Multiple MPTT Model Objects form field plugin. Makes use of
|
||||
the ``mptt.forms.TreeNodeMultipleChoiceField`` and
|
||||
``django.forms.widgets.SelectMultiple``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
Install `django-mptt`
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
#####################
|
||||
Taken from django-mptt `Getting started
|
||||
<http://django-mptt.github.io/django-mptt/tutorial.html#getting-started>`_.
|
||||
|
||||
|
|
@ -20,52 +20,52 @@ Taken from django-mptt `Getting started
|
|||
2. Add ``mptt`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
Install `select_multiple_mptt_model_objects` plugin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1. Add
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
###################################################
|
||||
(1) Add
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'mptt',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'mptt',
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
(4) Make sure to take a look at
|
||||
``fobi.contrib.plugins.form_elements.fields.select_multiple_mptt_model_objects.defaults.IGNORED_MODELS``.
|
||||
If necessary, override it in your `settings` as shown in the example below:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MPTT_MODEL_OBJECTS_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MPTT_MODEL_OBJECTS_IGNORED_MODELS = [
|
||||
'auth.User',
|
||||
'auth.Group',
|
||||
]
|
||||
|
||||
5. By default, the submitted form value of `select_multiple_mptt_model_objects`
|
||||
elements is `app_label.model_name.object_pk.object_repr`. However, that part
|
||||
of the behaviour has been made configurable. You can choose between the
|
||||
following options:
|
||||
(5) By default, the submitted form value of `select_multiple_mptt_model_objects`
|
||||
elements is `app_label.model_name.object_pk.object_repr`. However, that part
|
||||
of the behaviour has been made configurable. You can choose between the
|
||||
following options:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
- "val": `app_label.model_name.object_pk.object_repr`.
|
||||
- "repr": `object_repr` (uses the ``__unicode__`` method of the model).
|
||||
- "mix" (default): `app_label.model_name.object_pk.object_repr`.
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MPTT_MODEL_OBJECTS_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_MPTT_MODEL_OBJECTS_SUBMIT_VALUE_AS``
|
||||
assign one of the following values: "val", "repr" or "mix" to get the
|
||||
desired behaviour.
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
fobi.contrib.plugins.form_elements.fields.select_multiple_with_max
|
||||
==================================================================
|
||||
------------------------------------------------------------------
|
||||
A ``Fobi`` Select Multiple form field plugin with max choices. Makes use of
|
||||
the ``django.forms.widgets.SelectMultiple``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.select_multiple_with_max``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.select_multiple_with_max``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_with_max',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.select_multiple_with_max',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. By default, the submitted form value of `select_multiple_with_max`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
(4) By default, the submitted form value of `select_multiple_with_max`
|
||||
elements is label (human readable representation of the value chosen).
|
||||
However, that part of the behaviour has been made configurable. You can
|
||||
choose between the following options:
|
||||
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
Consider the following list of (value, label) choices (the first element in
|
||||
the tuple is value, the second element is label):
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
[
|
||||
('alpha', 'Alpha'),
|
||||
('beta', 'Beta'),
|
||||
('gamma', 'Gamma'),
|
||||
]
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
- "val": `value` (example: "alpha").
|
||||
- "repr" (default): `label` (example: "Alpha").
|
||||
- "mix": `value (label)` (example: "Alpha (alpha)").
|
||||
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_WITH_MAX_SUBMIT_VALUE_AS`` assign one of the
|
||||
following values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
Simply set the
|
||||
``FOBI_FORM_ELEMENT_SELECT_MULTIPLE_WITH_MAX_SUBMIT_VALUE_AS`` assign one of the
|
||||
following values: "val", "repr" or "mix" to get the desired behaviour.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
fobi.contrib.plugins.form_elements.fields.slider
|
||||
================================================
|
||||
------------------------------------------------
|
||||
A ``Fobi`` Percentage form field plugin. Makes use of the
|
||||
``django.forms.fields.ChoiceField`` and ``django.forms.widgets.Select``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.slider`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.slider`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.slider',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.slider',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Ranges are specified within the given min/max values. The default values
|
||||
are:
|
||||
(4) Ranges are specified within the given min/max values. The default values
|
||||
are:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- INITIAL: 50
|
||||
- INITIAL_MAX_VALUE: 100
|
||||
- INITIAL_MIN_VALUE: 0
|
||||
- MIN_VALUE: 0
|
||||
- MAX_VALUE: 100
|
||||
- STEP: 1
|
||||
- INITIAL: 50
|
||||
- INITIAL_MAX_VALUE: 100
|
||||
- INITIAL_MIN_VALUE: 0
|
||||
- MIN_VALUE: 0
|
||||
- MAX_VALUE: 100
|
||||
- STEP: 1
|
||||
|
||||
However, you can override each of them in the settings of your project by
|
||||
prefixing correspondent names with `FOBI_FORM_ELEMENT_SLIDER_`:
|
||||
However, you can override each of them in the settings of your project by
|
||||
prefixing correspondent names with `FOBI_FORM_ELEMENT_SLIDER_`:
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_STEP
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_INITIAL_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_MIN_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_MAX_VALUE
|
||||
- FOBI_FORM_ELEMENT_SLIDER_STEP
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.fields.slug
|
||||
==============================================
|
||||
----------------------------------------------
|
||||
A ``Fobi`` Text form field plugin. Makes use of the
|
||||
``django.forms.fields.SlugField`` and ``django.forms.widgets.TextInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.slug`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.slug`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.slug',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.slug',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.fields.text
|
||||
==============================================
|
||||
----------------------------------------------
|
||||
A ``Fobi`` Text form field plugin. Makes use of the
|
||||
``django.forms.fields.CharField`` and ``django.forms.widgets.TextInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.text`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.text`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.text',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.text',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.fields.textarea
|
||||
==================================================
|
||||
--------------------------------------------------
|
||||
A ``Fobi`` Textarea form field plugin. Makes use of the
|
||||
``django.forms.fields.CharField`` and ``django.forms.widgets.Textarea``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.textarea`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.textarea`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.textarea',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.textarea',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
fobi.contrib.plugins.form_elements.fields.time
|
||||
==============================================
|
||||
----------------------------------------------
|
||||
A ``Fobi`` DateTime form field plugin. Makes use of the
|
||||
``django.forms.fields.TimeField`` and
|
||||
``django.forms.widgets.TextInput``.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.time`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.time`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.time',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.time',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
fobi.contrib.plugins.form_elements.fields.url
|
||||
=============================================
|
||||
---------------------------------------------
|
||||
A ``Fobi`` URL form field plugin. Makes use of the
|
||||
``django.forms.fields.URLField`` and ``django.forms.widgets.URLInput`` falling
|
||||
back to ``django.forms.widgets.TextInput`` for older Django versions.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.fields.url`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.fields.url`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.url',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.fields.url',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,70 +1,70 @@
|
|||
fobi.contrib.plugins.form_elements.security.captcha
|
||||
===================================================
|
||||
---------------------------------------------------
|
||||
A `CAPTCHA <http://en.wikipedia.org/wiki/CAPTCHA>`_ form field plugin. Makes
|
||||
use of the `django-simple-captcha
|
||||
<http://readthedocs.org/docs/django-simple-captcha>`_.
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
You will need `libfreetype6`, otherwise `django-captcha` won't work.
|
||||
~~~~~~~~~~~~~
|
||||
You will need ``libfreetype6``, otherwise ``django-captcha`` won't work.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-get install libfreetype6-dev
|
||||
|
||||
Installation
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
Install `django-simple-captcha`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
###############################
|
||||
Taken from django-simple-captcha `installation instructions
|
||||
<http://django-simple-captcha.readthedocs.org/en/latest/usage.html#installation>`_.
|
||||
|
||||
1. Download ``django-simple-captcha`` using pip by running:
|
||||
(1) Download ``django-simple-captcha`` using pip by running:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
pip install django-simple-captcha
|
||||
pip install django-simple-captcha
|
||||
|
||||
2. Add ``captcha`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
(2) Add ``captcha`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
3. Run ``python manage.py syncdb`` (or ``python manage.py migrate`` if you are
|
||||
managing database migrations via South) to create the required database
|
||||
tables.
|
||||
(3) Run ``python manage.py syncdb`` (or ``python manage.py migrate`` if you are
|
||||
managing database migrations via South) to create the required database
|
||||
tables.
|
||||
|
||||
4. Add an entry to your ``urls.py``:
|
||||
(4) Add an entry to your ``urls.py``:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
urlpatterns += [
|
||||
url(r'^captcha/', include('captcha.urls')),
|
||||
]
|
||||
urlpatterns += [
|
||||
url(r'^captcha/', include('captcha.urls')),
|
||||
]
|
||||
|
||||
Install `fobi` Captcha plugin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1. Add ``fobi.contrib.plugins.form_elements.security.captcha`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
#############################
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.security.captcha`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.captcha',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.captcha',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
Troubleshooting and usage limitations
|
||||
-------------------------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In combination with other captcha solutions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
###########################################
|
||||
At the moment, you can't use both ``CAPTCHA``
|
||||
(fobi.contrib.plugins.form_elements.security.captcha) and ``ReCAPTCHA``
|
||||
(fobi.contrib.plugins.form_elements.security.recaptcha) plugins alongside due
|
||||
|
|
@ -74,7 +74,7 @@ packages. That limitation is likely to be solved in future in the
|
|||
another, but not both on the same time.
|
||||
|
||||
Usage
|
||||
-----
|
||||
~~~~~
|
||||
Note, that unlike most of the other form element plugins, default
|
||||
value for the ``required`` attribute is True, which makes the Captcha
|
||||
obligatory. Although you could still set it to False, it does not make
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
fobi.contrib.plugins.form_elements.security.honeypot
|
||||
====================================================
|
||||
----------------------------------------------------
|
||||
A `Honeypot <http://en.wikipedia.org/wiki/Honeypot_%28computing%29>`_
|
||||
form field plugin. Just another anti-spam technique.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.security.honeypot`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.security.honeypot`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.honeypot',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.honeypot',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,59 +1,58 @@
|
|||
=====================================================
|
||||
fobi.contrib.plugins.form_elements.security.recaptcha
|
||||
=====================================================
|
||||
-----------------------------------------------------
|
||||
A `ReCAPTCHA <http://en.wikipedia.org/wiki/ReCAPTCHA>`_ form field plugin.
|
||||
Makes use of the `django-recaptcha
|
||||
<https://github.com/praekelt/django-recaptcha>`_.
|
||||
|
||||
Installation
|
||||
============
|
||||
~~~~~~~~~~~~
|
||||
Install `django-recaptcha`
|
||||
--------------------------
|
||||
1. Download ``django-recaptcha`` using pip by running:
|
||||
##########################
|
||||
(1) Download ``django-recaptcha`` using pip by running:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
pip install django-recaptcha
|
||||
pip install django-recaptcha
|
||||
|
||||
2. Add ``captcha`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
(2) Add ``captcha`` to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
3. Run ``python manage.py syncdb`` (or ``python manage.py migrate`` if you are
|
||||
(3) Run ``python manage.py syncdb`` (or ``python manage.py migrate`` if you are
|
||||
managing database migrations via South) to create the required database
|
||||
tables.
|
||||
|
||||
Install `fobi` ReCAPTCHA plugin
|
||||
-------------------------------
|
||||
1. Add ``fobi.contrib.plugins.form_elements.security.recaptcha`` to the
|
||||
###############################
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.security.recaptcha`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.recaptcha',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.security.recaptcha',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Specify the following ReCAPTCHA credentials in your settings.
|
||||
(4) Specify the following ReCAPTCHA credentials in your settings.
|
||||
|
||||
.. code-block:: text
|
||||
.. code-block:: text
|
||||
|
||||
- ``RECAPTCHA_PUBLIC_KEY``
|
||||
- ``RECAPTCHA_PRIVATE_KEY``
|
||||
- ``RECAPTCHA_PUBLIC_KEY``
|
||||
- ``RECAPTCHA_PRIVATE_KEY``
|
||||
|
||||
Troubleshooting and usage limitations
|
||||
=====================================
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
In combination with other captcha solutions
|
||||
-------------------------------------------
|
||||
###########################################
|
||||
At the moment, you can't use both ``CAPTCHA``
|
||||
(fobi.contrib.plugins.form_elements.security.captcha) and ``ReCAPTCHA``
|
||||
(fobi.contrib.plugins.form_elements.security.recaptcha) plugins alongside due
|
||||
|
|
@ -69,7 +68,7 @@ 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
|
||||
value for the ``required`` attribute is True, which makes the ReCaptcha
|
||||
obligatory. Although you could still set it to False, it does not make
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
=============================================
|
||||
fobi.contrib.plugins.form_elements.test.dummy
|
||||
=============================================
|
||||
---------------------------------------------
|
||||
A ``Fobi`` Dummy form element plugin. Created for testing purposes.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.plugins.form_elements.test.dummy`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_elements.test.dummy`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.test.dummy',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_elements.test.dummy',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
2
src/fobi/contrib/plugins/form_handlers/README.rst
Normal file
2
src/fobi/contrib/plugins/form_handlers/README.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Form handlers
|
||||
=============
|
||||
|
|
@ -1,56 +1,55 @@
|
|||
===========================================
|
||||
fobi.contrib.plugins.form_handlers.db_store
|
||||
===========================================
|
||||
-------------------------------------------
|
||||
A ``Fobi`` Database Store form-/wizard- handler plugin. Saves submitted form
|
||||
data into the ``SavedFormDataEntry``/``SavedFormWizardDataEntry`` models.
|
||||
|
||||
Dependencies
|
||||
============
|
||||
~~~~~~~~~~~~
|
||||
The `xlwt <https://pypi.python.org/pypi/xlwt>`_ package is required
|
||||
(optional) for XLS export. If not present, export format falls back
|
||||
to CSV.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.plugins.form_handlers.db_store`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_handlers.db_store`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.db_store',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.db_store',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py migrate
|
||||
./manage.py migrate
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
||||
4. Add db_store form handler plugin URLs to the urls.py of your project.
|
||||
(4) Add db_store form handler plugin URLs to the urls.py of your project.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
urlpatterns = [
|
||||
# DB Store plugin URLs
|
||||
url(r'^fobi/plugins/form-handlers/db-store/',
|
||||
include('fobi.contrib.plugins.form_handlers.db_store.urls')),
|
||||
]
|
||||
urlpatterns = [
|
||||
# DB Store plugin URLs
|
||||
url(r'^fobi/plugins/form-handlers/db-store/',
|
||||
include('fobi.contrib.plugins.form_handlers.db_store.urls')),
|
||||
]
|
||||
|
||||
For form wizards do:
|
||||
For form wizards do:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
urlpatterns = [
|
||||
# DB Store plugin URLs
|
||||
url(r'^fobi/plugins/form-wizard-handlers/db-store/',
|
||||
include('fobi.contrib.plugins.form_handlers.db_store.urls.'
|
||||
'form_wizard_handlers')),
|
||||
]
|
||||
urlpatterns = [
|
||||
# DB Store plugin URLs
|
||||
url(r'^fobi/plugins/form-wizard-handlers/db-store/',
|
||||
include('fobi.contrib.plugins.form_handlers.db_store.urls.'
|
||||
'form_wizard_handlers')),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
==============================================
|
||||
fobi.contrib.plugins.form_handlers.http_repost
|
||||
==============================================
|
||||
----------------------------------------------
|
||||
A ``Fobi`` HTTP Repost form handler plugin. Submits the form
|
||||
data as is to the given endpoint.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.plugins.form_handlers.http_repost`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_handlers.http_repost`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.http_repost',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.http_repost',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
|
|
@ -1,27 +1,26 @@
|
|||
=======================================
|
||||
fobi.contrib.plugins.form_handlers.mail
|
||||
=======================================
|
||||
---------------------------------------
|
||||
A ``Fobi`` Mail form handler plugin. Submits the form
|
||||
data by email to the specified email address.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.plugins.form_handlers.mail`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.plugins.form_handlers.mail`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.mail',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.plugins.form_handlers.mail',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. In the terminal type:
|
||||
(2) In the terminal type:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
./manage.py fobi_sync_plugins
|
||||
./manage.py fobi_sync_plugins
|
||||
|
||||
3. Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
(3) Assign appropriate permissions to the target users/groups to be using
|
||||
the plugin if ``FOBI_RESTRICT_PLUGIN_ACCESS`` is set to True.
|
||||
|
|
|
|||
2
src/fobi/contrib/plugins/form_importers/README.rst
Normal file
2
src/fobi/contrib/plugins/form_importers/README.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Form importers
|
||||
==============
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
==================
|
||||
mailchimp_importer
|
||||
==================
|
||||
------------------
|
||||
A ``django-fobi`` integration with MailChimp.
|
||||
|
||||
This plugin makes it possible to import a form from a MailChimp list. A typical
|
||||
|
|
@ -16,7 +15,7 @@ For additional information on MailChimp import see the following `article
|
|||
<http://kb.mailchimp.com/lists/managing-subscribers/manage-list-and-signup-form-fields>`_.
|
||||
|
||||
Prerequisites
|
||||
=============
|
||||
~~~~~~~~~~~~~
|
||||
Python wrapper for the Mailchimp:
|
||||
|
||||
.. code-block:: sh
|
||||
|
|
@ -31,9 +30,9 @@ package as well:
|
|||
pip install django-formtools
|
||||
|
||||
Installation
|
||||
============
|
||||
~~~~~~~~~~~~
|
||||
your_project/settings.py
|
||||
------------------------
|
||||
########################
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = list(INSTALLED_APPS)
|
||||
|
|
@ -42,7 +41,7 @@ your_project/settings.py
|
|||
]
|
||||
|
||||
How it works
|
||||
============
|
||||
~~~~~~~~~~~~
|
||||
Assuming that you have configured the `mailchimp_importer` plugin properly and
|
||||
have the Django running locally on port 8000, accessing the following URL would
|
||||
bring you to the MailChimp form import wizard.
|
||||
|
|
@ -55,7 +54,7 @@ information. The key isn't stored/saved/remembered. Next time you want to
|
|||
import a form from the same account, you would have to provide it again.
|
||||
|
||||
Development status
|
||||
==================
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
This part of code is alpha, which means it experimental and needs improvements.
|
||||
|
||||
See the `TODOS <https://raw.githubusercontent.com/barseghyanartur/django-fobi/master/TODOS.rst>`_
|
||||
|
|
|
|||
2
src/fobi/contrib/themes/README.rst
Normal file
2
src/fobi/contrib/themes/README.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Themes
|
||||
======
|
||||
|
|
@ -1,23 +1,22 @@
|
|||
==============================
|
||||
fobi.contrib.themes.bootstrap3
|
||||
==============================
|
||||
------------------------------
|
||||
A ``django-fobi`` Bootstrap 3 theme. Based on the ??? template.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.themes.bootstrap3`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.themes.bootstrap3`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.bootstrap3',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.bootstrap3',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. Specify ``bootstrap3`` as a default theme in your ``settings.py``:
|
||||
(2) Specify ``bootstrap3`` as a default theme in your ``settings.py``:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_DEFAULT_THEME = 'bootstrap3'
|
||||
FOBI_DEFAULT_THEME = 'bootstrap3'
|
||||
|
|
|
|||
|
|
@ -1,43 +1,42 @@
|
|||
===============================================
|
||||
fobi.contrib.themes.djangocms_admin_style_theme
|
||||
===============================================
|
||||
-----------------------------------------------
|
||||
A ``django-fobi`` theme in a style of ``djangocms-admin-style`` admin.
|
||||
Relies on ``djangocms-admin-style`` package and some jQuery UI only.
|
||||
|
||||
jQuery UI "Smoothness" theme comes from `here <http://jqueryui.com/>`_.
|
||||
|
||||
Installation
|
||||
============
|
||||
~~~~~~~~~~~~
|
||||
Install `djangocms-admin-style`
|
||||
-------------------------------
|
||||
###############################
|
||||
See the original `installation instructions
|
||||
<https://pypi.python.org/pypi/djangocms-admin-style#installation>`_.
|
||||
|
||||
1. Install the ``djangocms-admin-style`` package.
|
||||
(1) Install the ``djangocms-admin-style`` package.
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
pip install djangocms-admin-style
|
||||
pip install djangocms-admin-style
|
||||
|
||||
2. Add 'djangocms_admin_style' to your INSTALLED_APPS just before
|
||||
'django.contrib.admin'.
|
||||
(2) Add ``djangocms_admin_style`` to your ``INSTALLED_APPS`` just before
|
||||
``django.contrib.admin``.
|
||||
|
||||
Install `fobi.contrib.themes.djangocms_admin_style_theme` theme
|
||||
---------------------------------------------------------------
|
||||
1. Add ``fobi.contrib.themes.djangocms_admin_style_theme`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
###############################################################
|
||||
(1) Add ``fobi.contrib.themes.djangocms_admin_style_theme`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.djangocms_admin_style_theme',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.djangocms_admin_style_theme',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. Specify ``djangocms_admin_style_theme`` as a default theme in your
|
||||
``settings.py``:
|
||||
(2) Specify ``djangocms_admin_style_theme`` as a default theme in your
|
||||
``settings.py``:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_DEFAULT_THEME = 'djangocms_admin_style_theme'
|
||||
FOBI_DEFAULT_THEME = 'djangocms_admin_style_theme'
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
===============================
|
||||
fobi.contrib.themes.foundation5
|
||||
===============================
|
||||
-------------------------------
|
||||
A ``django-fobi`` Foundation 5 theme. Based on the ??? template, but
|
||||
entire JS and CSS are taken from Foundation 5 version 5.4.0. The
|
||||
`following <http://zurb.com/playground/foundation-icon-fonts-3>`_ icon set
|
||||
was used.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.themes.foundation5`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.themes.foundation5`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.foundation5',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.foundation5',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. Specify ``foundation5`` as a default theme in your ``settings.py``:
|
||||
(2) Specify ``foundation5`` as a default theme in your ``settings.py``:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_DEFAULT_THEME = 'foundation5'
|
||||
FOBI_DEFAULT_THEME = 'foundation5'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
==========================
|
||||
fobi.contrib.themes.simple
|
||||
==========================
|
||||
--------------------------
|
||||
A ``django-fobi`` theme in a style of Django admin. Relies on Django-admin
|
||||
and some jQuery UI only.
|
||||
|
||||
|
|
@ -8,20 +7,20 @@ jQuery UI "Django" theme comes from `here
|
|||
<http://jqueryui.com/themeroller/#!zThemeParams=5d000001004406000000000000003d8888d844329a8dfe02723de3e5702531794cd29e6ed19a93500bec10499630a65410e41ead4c600a0cf20b340bb5e2f7caf959ed396c92b6035d90d24df6690df466ac448d4e1c19e7fa7c9a0839be4194bf063920ea1af50a8118ad9351aef9ad563b3a37cd36e7495624fe90fc1dea5e04da5c3bc1b05fbaabd52118818b56bf553915a91d00d5f3e6d7170d10432c322c435542e105860d86f5aff187d2c5fd576473852b0a11341f0f25f44acc20995011eacc757f738992c953dbc7a1465ffdb121cb5442e4eab396fc706de223fe0fc9c95a7d117899db8aa67ebf8d5b547778d8301f54035188d6f909c525eba7227394e77fa275211eca51b9a828c4266d31e94e9ad9d094e2d5313fc059abfb69532833a14287184b79fd3e769e36246d5f0b3f8fb23a589e0ce916bb6b074faf8dbac4a8f379a481f14755e3043f7a684ccde3630e138ed0ed7e0e4af40517ffcf11fd3581d7da611c79f6481f3e02d2d1645c776ada5da686c7e62ad51e829cf9ba6ec42e0a7afa3dcaed299f70bd4a28055aa8c0f6d9d1d5f362280aff2c9be5d5355c0e15c5145565ac449331112dd272ba1c7f326f3502465763e229cdc80dec6054935a2c4ef8b62e3f00a7bee54e59377abda70f8f3fbd15004573b3372aaddd79545e195b14abddcb8dc730dc65504265aece22ee6158670dbc2d11f314ffebbc5e3d>`_.
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.themes.simple`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
~~~~~~~~~~~~
|
||||
(1) Add ``fobi.contrib.themes.simple`` to the
|
||||
``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.simple',
|
||||
# ...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.simple',
|
||||
# ...
|
||||
)
|
||||
|
||||
2. Specify ``simple`` as a default theme in your ``settings.py``:
|
||||
(2) Specify ``simple`` as a default theme in your ``settings.py``:
|
||||
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
FOBI_DEFAULT_THEME = 'simple'
|
||||
FOBI_DEFAULT_THEME = 'simple'
|
||||
|
|
|
|||
Loading…
Reference in a new issue