Estou com uma grande dificuldade de rodar o meu Plugin de Thema

Summary
After upgrading to a development version of Kolibri (0.19.0a0), the platform fails to load the login page, returning an Internal Server Error (500). The traceback indicates an IndexError in theme_hook.py when trying to access the first registered theme. It appears that no theme is being registered, even though the custom vicky_theme exists in the project.

Technical details

  • Kolibri version: 0.19.0a0.dev0+git.240.g787aab08

  • Operating system: Ubuntu 22.04 (or your OS)

  • Browser: Chrome 139.0.0.0

Additional information:

  • The error traceback shows:

    IndexError: list index out of range
    File ".../kolibri/core/theme_hook.py", line 38, in get_theme
        theme = list(cls.registered_hooks)[0].theme
    
    
  • The .kolibri/options.ini file is missing or incomplete.

  • The database exists (kolibri.db), but .tables shows no tables.

Question:
Could this be caused by a misregistration of the vicky_theme, or is it related to missing image references in the theme?

Error:

INFO     2025-08-26 20:40:36,718 Option DEBUG in section \[Server\] being overridden by environment variable KOLIBRI_DEBUG
INFO     2025-08-26 20:40:36,718 Option DEBUG_LOG_DATABASE in section \[Server\] being overridden by environment variable KOLIBRI_DEBUG_LOG_DATABASE
WARNING  2025-08-26 20:40:36,719 Ignoring unknown section in options file /home/fabrisc/.kolibri/options.ini under top level: User.
INFO     2025-08-26 20:40:36,859 Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     2025-08-26 20:40:36,940 Starting Kolibri 0.19.0a0.dev0+git.240.g787aab08
INFO     2025-08-26 20:40:36,954 Bus state: ENTER
INFO     2025-08-26 20:40:36,955 Listening for SIGTERM.
INFO     2025-08-26 20:40:36,955 Listening for SIGHUP.
INFO     2025-08-26 20:40:36,955 Listening for SIGUSR1.
INFO     2025-08-26 20:40:36,955 Listening for SIGINT.
INFO     2025-08-26 20:40:36,955 Bus state: IDLE
INFO     2025-08-26 20:40:36,956 Bus state: START
INFO     2025-08-26 20:40:36,956 Starting async task workers.
INFO     2025-08-26 20:40:36,957 Requeuing stalled jobs.
INFO     2025-08-26 20:40:36,982 Started monitor thread ‘ZeroConfPlugin’.
INFO     2025-08-26 20:40:36,983 Started monitor thread ‘ProcessControlPlugin’.
INFO     2025-08-26 20:40:36,983 Starting on 0.0.0.0:0
INFO     2025-08-26 20:40:37,083 Waiting for 0.0.0.0:59551
INFO     2025-08-26 20:40:37,084 Serving on 0.0.0.0:59551
INFO     2025-08-26 20:40:37,086 Starting on 0.0.0.0:8000
INFO     2025-08-26 20:40:37,186 Waiting for 0.0.0.0:8000
INFO     2025-08-26 20:40:37,187 Serving on 0.0.0.0:8000
INFO     2025-08-26 20:40:37,188 Kolibri running on: http://172.30.39.237:8000/
INFO     2025-08-26 20:40:37,188 Kolibri running on: http://10.255.255.254:8000/
INFO     2025-08-26 20:40:37,188 Kolibri running on: http://127.0.0.1:8000/
INFO     2025-08-26 20:40:37,188 Bus state: RUN
INFO     2025-08-26 20:40:37,192 Registering ourselves to zeroconf network with id ‘2cc10b5d2ea59b0f75dcf6939a1437e6’ and port ‘8000’
INFO     2025-08-26 20:40:37,469 Ping succeeded! (response: {‘id’: 11741230, ‘messages’: [ ]})
INFO     2025-08-26 20:40:48,948 172.30.32.1 - - “GET /pt-br/setup/” 302 0 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36”
INFO     2025-08-26 20:40:48,955 172.30.32.1 - - “GET /pt-br/redirectuser/” 302 0 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36”
ERROR    2025-08-26 20:40:48,967 Internal Server Error: /pt-br/auth/
Traceback (most recent call last):
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/core/handlers/exception.py”, line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/core/handlers/base.py”, line 204, in \_get_response
response = response.render()
^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/response.py”, line 105, in render
self.content = self.rendered_content
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/response.py”, line 83, in rendered_content
return template.render(context, self.\_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/backends/django.py”, line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 170, in render
return self.\_render(context)
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 162, in \_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/loader_tags.py”, line 150, in render
return compiled_parent.\_render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 162, in \_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/base.py”, line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/django/template/library.py”, line 192, in render
output = self.func(\*resolved_args, \*\*resolved_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/kolibri/core/templatetags/core_tags.py”, line 49, in theme_favicon
for logo in ThemeHook.get_theme().get(“logos”, [ ])
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/kolibri/core/theme_hook.py”, line 38, in get_theme
theme = list(cls.registered_hooks)\[0\].theme
\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~^^^
IndexError: list index out of range

Plugin Code:

from kolibri.plugins import KolibriPluginBase

from kolibri.plugins.hooks import register_hook

from kolibri.core import theme_hook

from django.templatetags.static import static

class VickyThemePlugin(KolibriPluginBase):

pass


@register_hookregister_hook

class VickyThemeHook(theme_hook.ThemeHook):


@property

def theme(self):

    return {

        "signIn": {

            "background": static("assets/default_theme/background.jpg"),

            "backgroundImgCredit": "Lewa Wildlife Conservancy",

            "topLogo": {

                "style": "padding-left: 64px; padding-right: 64px; margin-bottom: 8px; margin-top: 8px",

            },

        },

        "logos": \[

            {

                "src": static("assets/favicons/logo.ico"),

                "content_type": "image/vnd.microsoft.icon",

                "size": "32x32",

            },

            {

                "src": static("assets/default_theme/kolibri-logo.svg"),

                "content_type": "image/svg+xml",

                \# See https://web.dev/maskable-icon/ for details on what

                \# icons count as maskable. The default Kolibri logo is not,

                \# as the outer 'waves' circle gets cropped.

                "maskable": False,

                "size": "any",

            },

            {

                "src": static("assets/default_theme/kolibri-logo-192.png"),

                "content_type": "image/png",

                "size": "192x192",

            },

            {

                "src": static("assets/default_theme/kolibri-logo-512.png"),

                "content_type": "image/png",

                "size": "512x512",

            },

        \],

    }



    \# Sobrescreve o logo

    base_theme\["logos"\] = \[

        {"src": static("img/logo.png"), "size": "any", "content_type": "image/png"}

    \]



    \# Adiciona seu CSS customizado

    if "css" in base_theme:

        base_theme\["css"\].append(static("css/custom.css"))

    else:

        base_theme\["css"\] = \[static("css/custom.css")\]



    return base_theme

Hi @Fabrisc,

The development version of Kolibri is still in progress and may not be stable for installation and wider use at this time. I recommend upgrading to the latest stable release (0.18.2), which can be found on the Learning Equality website.

Hi @liana, I did it, but it doesn’t work.

(.venv) fabrisc@VICKY-Fabrisc:~/kolibri$ kolibri start --foreground --port=8000
ERROR 2025-08-27 11:13:54,572 Plugin kolibri.plugins.vicky_theme not found and disabled. To re-enable it, run:
$ kolibri plugin kolibri.plugins.vicky_theme enable
INFO 2025-08-27 11:13:54,599 Option DEBUG in section [Server] being overridden by environment variable KOLIBRI_DEBUG
INFO 2025-08-27 11:13:54,600 Option DEBUG_LOG_DATABASE in section [Server] being overridden by environment variable KOLIBRI_DEBUG_LOG_DATABASE
INFO 2025-08-27 11:13:54,869 Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2025-08-27 11:13:55,006 Version was 0.19.0a0.dev0+git.240.g787aab08, new version: 0.18.2
INFO 2025-08-27 11:13:55,006 Running update routines for new version…
Operations to perform:
Apply all migrations: analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
No migrations to apply.
Operations to perform:
Apply all migrations: analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
No migrations to apply.
Operations to perform:
Apply all migrations: analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
No migrations to apply.
Operations to perform:
Apply all migrations: analytics, auth, bookmarks, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, notifications, sessions
Running migrations:
No migrations to apply.
Installed 2 object(s) from 1 fixture(s)
INFO 2025-08-27 11:13:55,585 Detected updates to plugins: kolibri.plugins.user_auth, kolibri.plugins.perseus_viewer, kolibri.plugins.html5_viewer, kolibri.plugins.facility, kolibri.plugins.media_player, kolibri.plugins.coach, kolibri.plugins.slideshow_viewer, kolibri.plugins.bloompub_viewer, kolibri.plugins.epub_viewer, kolibri.plugins.setup_wizard, kolibri.plugins.user_profile, kolibri.plugins.device, kolibri.plugins.qti_viewer, kolibri.plugins.pdf_viewer, kolibri.plugins.learn
INFO 2025-08-27 11:13:55,589 Running downgrade routines for kolibri.plugins.user_auth, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,589 kolibri.plugins.user_auth successfully updated
INFO 2025-08-27 11:13:55,589 Running downgrade routines for kolibri.plugins.perseus_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,589 kolibri.plugins.perseus_viewer successfully updated
INFO 2025-08-27 11:13:55,589 Running downgrade routines for kolibri.plugins.html5_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,589 kolibri.plugins.html5_viewer successfully updated
INFO 2025-08-27 11:13:55,590 Running downgrade routines for kolibri.plugins.facility, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,590 kolibri.plugins.facility successfully updated
INFO 2025-08-27 11:13:55,590 Running downgrade routines for kolibri.plugins.media_player, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,590 kolibri.plugins.media_player successfully updated
INFO 2025-08-27 11:13:55,590 Running downgrade routines for kolibri.plugins.coach, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,590 kolibri.plugins.coach successfully updated
INFO 2025-08-27 11:13:55,591 Running downgrade routines for kolibri.plugins.slideshow_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,591 kolibri.plugins.slideshow_viewer successfully updated
INFO 2025-08-27 11:13:55,591 Running downgrade routines for kolibri.plugins.bloompub_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,592 kolibri.plugins.bloompub_viewer successfully updated
INFO 2025-08-27 11:13:55,592 Running downgrade routines for kolibri.plugins.epub_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,592 kolibri.plugins.epub_viewer successfully updated
INFO 2025-08-27 11:13:55,592 Running downgrade routines for kolibri.plugins.setup_wizard, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,592 kolibri.plugins.setup_wizard successfully updated
INFO 2025-08-27 11:13:55,593 Running downgrade routines for kolibri.plugins.user_profile, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,593 kolibri.plugins.user_profile successfully updated
INFO 2025-08-27 11:13:55,593 Running downgrade routines for kolibri.plugins.device, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,593 kolibri.plugins.device successfully updated
INFO 2025-08-27 11:13:55,593 Running downgrade routines for kolibri.plugins.qti_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,594 kolibri.plugins.qti_viewer successfully updated
INFO 2025-08-27 11:13:55,594 Running downgrade routines for kolibri.plugins.pdf_viewer, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,594 kolibri.plugins.pdf_viewer successfully updated
INFO 2025-08-27 11:13:55,594 Running downgrade routines for kolibri.plugins.learn, downgrading from 0.19.0a0.dev0+git.240.g787aab08 to 0.18.2
INFO 2025-08-27 11:13:55,594 kolibri.plugins.learn successfully updated
INFO 2025-08-27 11:13:55,613 Starting Kolibri 0.18.2
INFO 2025-08-27 11:13:55,639 Bus state: ENTER
INFO 2025-08-27 11:13:55,639 Listening for SIGTERM.
INFO 2025-08-27 11:13:55,639 Listening for SIGHUP.
INFO 2025-08-27 11:13:55,639 Listening for SIGUSR1.
INFO 2025-08-27 11:13:55,639 Listening for SIGINT.
INFO 2025-08-27 11:13:55,640 Bus state: IDLE
INFO 2025-08-27 11:13:55,640 Bus state: START
INFO 2025-08-27 11:13:55,640 Starting async task workers.
INFO 2025-08-27 11:13:55,642 Requeuing stalled jobs.
INFO 2025-08-27 11:13:55,668 Started monitor thread ‘ProcessControlPlugin’.
INFO 2025-08-27 11:13:55,669 Started monitor thread ‘ZeroConfPlugin’.
INFO 2025-08-27 11:13:55,670 Starting on 0.0.0.0:8000
INFO 2025-08-27 11:13:55,770 Waiting for 0.0.0.0:8000
INFO 2025-08-27 11:13:55,771 Serving on 0.0.0.0:8000
INFO 2025-08-27 11:13:55,772 Kolibri running on: http://172.30.39.237:8000/
INFO 2025-08-27 11:13:55,772 Kolibri running on: http://127.0.0.1:8000/
INFO 2025-08-27 11:13:55,772 Kolibri running on: http://10.255.255.254:8000/
INFO 2025-08-27 11:13:55,773 Starting on 0.0.0.0:0
INFO 2025-08-27 11:13:55,874 Waiting for 0.0.0.0:33933
INFO 2025-08-27 11:13:55,874 Serving on 0.0.0.0:33933
INFO 2025-08-27 11:13:55,875 Bus state: RUN
INFO 2025-08-27 11:13:55,879 Registering ourselves to zeroconf network with id ‘2cc10b5d2ea59b0f75dcf6939a1437e6’ and port ‘8000’
INFO 2025-08-27 11:13:56,231 Ping succeeded! (response: {‘id’: 11752080, ‘messages’: })
INFO 2025-08-27 11:14:03,857 172.30.32.1 - - “PUT /api/auth/session/current/” 200 0 “http://172.30.39.237:8000/pt-br/auth/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36”
ERROR 2025-08-27 11:14:09,058 Internal Server Error: /pt-br/auth/
Traceback (most recent call last):
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/core/handlers/exception.py”, line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/core/handlers/base.py”, line 204, in _get_response
response = response.render()
^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/response.py”, line 105, in render
self.content = self.rendered_content
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/response.py”, line 83, in rendered_content
return template.render(context, self._request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/backends/django.py”, line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 170, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/loader_tags.py”, line 150, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 162, in _render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 938, in render
bit = node.render_annotated(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/base.py”, line 905, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/dist/django/template/library.py”, line 192, in render
output = self.func(*resolved_args, **resolved_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/core/templatetags/core_tags.py”, line 49, in theme_favicon
for logo in ThemeHook.get_theme().get(“logos”, )
^^^^^^^^^^^^^^^^^^^^^
File “/home/fabrisc/kolibri/.venv/lib/python3.12/site-packages/kolibri/core/theme_hook.py”, line 38, in get_theme
theme = list(cls.registered_hooks)[0].theme
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
INFO 2025-08-27 11:14:09,061 172.30.32.1 - - “GET /pt-br/auth/” 500 0 “http://172.30.39.237:8000/pt-br/learn/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36”
INFO 2025-08-27 11:14:09,181 172.30.32.1 - - “GET /favicon.ico” 404 0 “http://172.30.39.237:8000/pt-br/auth/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36”
WARNING 2025-08-27 11:14:09,181 Not Found: /favicon.ico

In that case, it looks like Kolibri isn’t finding any theme to register. I’d suggest double-checking that the plugin code is correct and doesn’t have any copy-paste or spacing issues, and verifying where the import path for the module is and that it’s in the right place so Kolibri can actually import it.

Thank you for getting back to me. This is my first experience working with Kolibri, which I believe is a tool that can greatly help our foundation. I think I am following the instructions correctly, but it could be something I am overlooking due to my lack of experience.

I placed the files where I believe they should go and wrote the code that I think might be correct, but it is not running. Could you give me an idea of what I might be missing?

Below, I have included how I structured everything in all of my attempts.

Path: ~/kolibri/kolibri/plugins/vicky_theme/

vicky_theme
init.py
pycache
kolibri_plugin.py
webpack.config.js
static
|
assets
| |
| default_theme
| |
| background.jpg
| kolibri-logo-192.png
| kolibri-logo-512.png
| kolibri-logo.svg
| kolibri-logo.svg.file_size
| kolibri-logo.svg.gz
css
| |
| custom.css
| custom.css.file_size
| custom.css.gz
img
|
background.jpg
logo.jpg
logo.png

My kolibri_plugin.py:

from kolibri.plugins import KolibriPluginBase

from kolibri.plugins.hooks import register_hook

from kolibri.core import theme_hook

from django.templatetags.static import static

class VickyThemePlugin(KolibriPluginBase):

pass

@register_hook

class VickyThemeHook(theme_hook.ThemeHook):

@property

def theme(self):

    theme_dict = {

        "signIn": {

            "background": static("assets/default_theme/background.jpg"),

            "backgroundImgCredit": "Lewa Wildlife Conservancy",

            "topLogo": {

                "style": "padding-left: 64px; padding-right: 64px; margin-bottom: 8px; margin-top: 8px",

            },

        },

        "logos": \[

            {"src": static("img/logo.png"), "size": "any", "content_type": "image/png"},

            {"src": static("assets/favicons/logo.ico"), "content_type": "image/vnd.microsoft.icon", "size": "32x32"},

            {"src": static("assets/default_theme/kolibri-logo.svg"), "content_type": "image/svg+xml", "maskable": False, "size": "any"},

            {"src": static("assets/default_theme/kolibri-logo-192.png"), "content_type": "image/png", "size": "192x192"},

            {"src": static("assets/default_theme/kolibri-logo-512.png"), "content_type": "image/png", "size": "512x512"},

        \],

        "css": \[static("css/custom.css")\],

    }



    return theme_dict