I'm interested in building a site in the same way (Django + Intercooler + VanillaJS). Do you have any recommended projects/readings to look into? Or do you have any thoughts on other alternatives (StimulusJS + Turbolinks / Unpoly)?
but in the end I did something slightly different: for actions I just have in my views:
if 'X-Ic-Request' not in request.headers:
# render full page (which includes the fragment template)
else:
# render fragment template (which Intercooler will interpolate into the page)
That way, should I get to that page by any other way (user has disabled JS, I have a link in my page because I want a full page reload), it still works fine. Hope this helps.
I had a look at Unpoly, that looks very interesting and could simplify the backend code even more.
Yeah, Django's documentation is top notch, but I haven't seen a lot about mixing Django + Intercooler. That's a cool approach to make sure the actions are always reachable. Will read these, and maybe reach out to you sometime to find out how you like Unpoly! Thanks!