Skip to content

Instantly share code, notes, and snippets.

@viktor2097
viktor2097 / README.md
Last active May 8, 2025 18:55
Dynamically add formset form with HTMX

Dynamically add additional forms for a formset using HTMX and a little bit of hyperscript

Supports deleting and adding rows.

I'm using django-template-partials, django-htmx, htmx and hyperscript

I decorate my views with the @htmx_dynamic_handler decorator. This decorator allows you to specify the action that triggers the HTMX request and the function that renders the partial.

@htmx_dynamic_handler("action", _function_that_renders_a_partial)
@viktor2097
viktor2097 / DOKKU_SCALE
Created March 15, 2021 21:22
dokku django gunicorn and asgi
web=1
websocket=1
import datetime
import logging
import os
from collections import namedtuple
from decimal import Decimal
from os import sys
from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
import clr
from System import Boolean, DateTime, Double, String