Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
this repo adds views to each app and updates the templates.
To make things easier, install the django-htmx package. Then, in your Page model's serve(), you can do things like if request.htmx: and return an HTML snippet instead of the full page in that case.
How you handle breaking the template apart is really up to you, and doesn't have an impact on the Wagtail admin, which only cares about your Page. The author of HTMX is fond of a pattern he calls Template Fragments; to take that approach with Django/Wagtail, you'll want django-render-block. But that might be overkill depending on your use case.