Customization options

Important

If you are adding or changing Fleio files, other than Fleio setting files that are stored in docker volumes, see Adding or changing files in Fleio docker images.

You generally have these customization options:

  1. Use backend settings and frontend settings to customize your Fleio installation
  2. Write some hooks
  3. Write specific modules, for things like payment gateways or two factor authentication
  4. Write a Django app

Write some hooks

Python Backend hooks/signals

The Python backend hooks are called signals. See how to add your custom code to run on certain events, without modifying Fleio source code: Python signals.

Frontend hooks

Fleio allows you to add your custom JavaScript, CSS, etc. code without modifying Fleio original code. This has the advantage that you don not need to merge code on every Fleio packages upgrade.

You can insert your HTML code (that can load JavaScript, CSS etc.) in the Fleio end-user panel index.html or staff panel index.html file. You can insert JavaScript code that changes the DOM dynamically. Use Frontend customization option in the staff panel to insert your custom code.

Write a Django app

Learn how to develop web applications with Django: https://www.djangoproject.com/start/

To include your app in the Fleio Django project add it to INSTALLED_APPS in the settings.py file:

INSTALLED_APPS += (
    'myapp',
)

You will also want to include your urls module in the project’s URLs map. Edit /var/webapps/fleio/project/fleio/url.py and add your module to urlpatterns:

urlpatterns = [
    # API URLs
    # ...
    path('{}myurl/'.format(settings.URL_PREFIX), include(('myapp.urls', 'myapp'), namespace='myapp')),
]

The settings.py file is never overwritten by Fleio.