Skip to content

Modules

Artucuno edited this page Jun 28, 2022 · 2 revisions

Creating Modules

Here is a basic guide on how to make modules for LoonaBilling

Barebone Example

/modules/mymodule.py

from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound
import config
module = Blueprint('My Module', __name__)
module.hasAdminPage = False
module.moduleDescription = 'My awesome module'
module.version = '1.0'

@module.route('/example')
def example():
    return 'It works!'
Clone this wiki locally