Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc - Fix customization.rst code blocks #297

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Media
Attached files are downloaded by default by browser, with the following line,
files will be opened in the browser :

.. code-block :: python
.. code-block:: python

MAPENTITY_CONFIG['SERVE_MEDIA_AS_ATTACHMENT'] = False

Expand All @@ -203,7 +203,7 @@ These files need to be protected as the parent picture. We use a regex to find t

You can change the regex, for example if you need to add other behaviour with easy_thumbnail :

.. code-block :: python
.. code-block:: python

MAPENTITY_CONFIG['REGEX_PATH_ATTACHMENTS'] = r'\.\d+x\d+_q\d+(_crop)?\.(jpg|png|jpeg)$'

Expand All @@ -218,24 +218,24 @@ layer style.
The styles are loaded in leaflet map in js and can be use with window.SETTINGS.map.styles


.. code-block :: python
.. code-block:: python

MAPENTITY_CONFIG['MAP_STYLES'][key] = {'color': 'red', 'weight': 5}

Or change just one parameter (the opacity for example) :

.. code-block :: python
.. code-block:: python

MAPENTITY_CONFIG['MAP_STYLES'][key]['opacity'] = 0.8


Edition
'''''''

For rich text fields, it is possible to indicate a max number of characters on a specified field (spaces includes).
A help message will be added, and color of TinyMCE status bar and border will be colored in red.
For rich text fields, it is possible to indicate a max number of characters on a specified field (spaces included).
A help message will be added, and color of TinyMCE status bar and border will be colored in red when max number of characters reached.

.. code-block :: python
.. code-block:: python

MAPENTITY_CONFIG['MAX_CHARACTERS_BY_FIELD'] = {
"tourism_touristicevent": [{'field': 'description_teaser_fr', 'value': 50}, {'field': 'accessibility_fr', 'value': 25}],
Expand Down