Metadata-Version: 2.4
Name: flask-admin-tabler
Version: 2026.2.1
Summary: Tabler UI theme for Flask-Admin
License: MIT License
         
         Copyright (c) 2026 Mario Hernandez
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
License-File: LICENSE
Keywords: flask,flask-admin,tabler,admin-interface,theme,template
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: dev
Requires-Dist: black ; extra == "dev"
Requires-Dist: flask-admin (>=2.0.2)
Requires-Dist: isort ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Project-URL: Source, https://github.com/mariofix/flask-admin-tablerui
Description-Content-Type: text/markdown

# flask-admin-tabler

A [Tabler UI](https://tabler.io/) theme for [Flask-Admin](https://github.com/pallets-eco/flask-admin).

## Installation

```shell
pip install flask-admin-tabler
```

## Usage

Call `theme.init_app(app)` **before** creating the `Admin` instance so that the
Tabler templates are registered with higher priority than Flask-Admin's default
Bootstrap ones.

```python
from flask import Flask
from flask_admin import Admin
from flask_admin_tabler import TablerTheme

app = Flask(__name__)
app.config["SECRET_KEY"] = "change-me"

theme = TablerTheme()
theme.init_app(app)          # must come before Admin(app, ...)

admin = Admin(app, name="My App", theme=theme)
```

That's it — navigating to `/admin/` will now render the Tabler UI instead of
the default Bootswatch theme.

A fully runnable example (including a SQLAlchemy model and sample data) is
available in [`examples/quickstart.py`](examples/quickstart.py):

```shell
pip install flask-admin-tabler flask-sqlalchemy
python examples/quickstart.py
# open http://127.0.0.1:5000/admin/
```

## How it works

`TablerTheme.init_app(app)` registers a Flask blueprint named
`flask_admin_tabler` that:

1. **Templates** — exposes `flask_admin_tabler/templates/tabler/` as a template
   folder.  Because this blueprint is registered *before* Flask-Admin's admin
   blueprint, Flask resolves `admin/base.html` (and all other admin templates)
   from here first.
2. **Static files** — serves the small amount of theme-specific CSS (e.g.
   `admin/css/tabler/admin.css`) at `/static/flask_admin_tabler/`.

Tabler's core CSS and JS are loaded from the jsDelivr CDN — no local copies
needed.

## Requirements

- Python ≥ 3.10
- flask-admin ≥ 2.0.2

