# /// script # requires-python = ">=3.13" # dependencies = [ # "great-tables==0.18.0", # "polars==1.33.1", # ] # /// import marimo __generated_with = "0.16.2" app = marimo.App(width="medium", auto_download=["html"]) with app.setup: import marimo as mo import polars as pl from great_tables import GT, html, md @app.cell def _(): tasks = [ "Set DEBUG = False", "Configure ALLOWED_HOSTS", "Set up a secret key", "Collect static files", "Apply database migrations", "Set up gunicorn or uWSGI", "Configure reverse proxy (e.g., Nginx)", "Secure the database", "Set up HTTPS (SSL)", "Configure logging & monitoring", ] notes = [ "Never deploy with DEBUG = True ⚠️", "Include your domain(s) or IP address 🌐", "Use a strong, secure key from an environment variable 🔐", "Run `python manage.py collectstatic` 📦", "Run `python manage.py migrate` 🗃️", "Use as a WSGI server in production 🔄", "Serve static/media files and forward to WSGI server 🧭", "Use strong credentials, disable remote root login 🛡️", "Use Let's Encrypt or your own certificate 🔒", "Track errors and app performance 📊", ] n_row = len(tasks) status = ["☐"] * n_row data = {"Status": status, "Task": tasks, "Notes": notes} return data, n_row @app.cell def _(data): df = pl.DataFrame(data) # df return (df,) @app.cell def _(n_row): status_widget = mo.ui.switch() status_widgets = mo.ui.array([status_widget] * n_row) # status_widgets return (status_widgets,) @app.function def create_bar( x: float, max_width: int, height: int, background_color1: str, background_color2: str, ) -> str: width = round(max_width * x, 2) px_width = f"{width}px" return f"""\