I wrote this as a twitter rant, but I think it reads (and indexes) nicely as a post.
It's hard to believe I'm saying this but WordPress has gotten so good since I last dealt with it like 10yrs ago. I still involuntarily twitch at the fact that it's all PHP, but what have I got in the Python camp? Nothing even comes close, and that's lamentable. Yeah there's Django, but I DON'T WANT TO WRITE MY OWN BLOG FROM SCRATCH FFS. Something easy and opinionated would serve 90% of people very well.
Of the slim pickings that I could find, very little is actively maintained. I looked at Zinnia, Mezzanine, and a couple of other things. The most promising was Puput so I gave it a shot, and I wanted to like it.
This is my 1.5th attempt at doing a Django, and dependencies are a nightmare. Puput blog is built on Wagtail CMS, which is built on Django, which runs on Python. Do you know how hard it is to get that stack of dependencies to align?? With versions that won't be deprecated six months or a year from now?
Part of the problem is that it's not well documented and not locked-in; running pip install puput
today will not produce the same results in a few months time because Django 3.4 will have come out or something, and that breaks everything. This was 5 months ago when I tried (Aug 2021), I arrived at my own requirements.txt
containing:
Django>=2.2,<3.0 wagtail>=2.7,<2.14 psycopg2>=2.8,<2.9 puput
Oh yeah older Django has a problem with newer psycopg2 too, sigh. I also hit this bug during my attempts, a problem with circular imports. I got around it somehow (the solution hadn't been found yet, only the problem), but I'm pretty sure I had the teetering stack of versions just right, so you'd better avoid touching them for as long as possible.
The docs are written for an arbitrary version of Puput, so the bit where you need add to the list of MIDDLEWARE
modules in the Django config are wrong because Wagtail has deprecated a few things in the interim, so off to google you go. But it stops complaining after you manage to sort that out.
I got it all working in the end though! On an almost EOL'd Django, but it worked!!
I even migrated all my Jekyll content over, before realising there's no code highlighting included by default. I can live without it, but I want highlighted code snippets. It is apparently doable:
After installing wagtail-markdown, you have to modify templates and follow the instruction to add Abstract base classes.
https://github.com/APSL/puput/issues/240#issuecomment-823321222
Faaaark I don't want to deal with this! I mean I tried, but I couldn't figure it out as I'm not well versed in Django, and now I need to understand Wagtail's view of the world too.
At this point I'm entirely disheartened. I love dev'ing stuff and learning how stuff works, but the payoff just ain't there there for me. Other people have clearly figured this out and made it work. I did find a Chinese dude who's already rolled that stuff into their repo, and the Taiwanese person who explained the code highlighting has done it as well, with a different choice of CSS/JS for the frontend.
I may give them a try some day but at this point I've given up, I'm bookmarking those repos and that's it. I'd try them not but I'm just so exhausted from all the failures while arriving here. Puput has had a new release since then and it claims support for Django 3.2, and that probably fixes some of the other dependency issues in the stack, which is good.
To be clear...
I'm not trying to rag on the devs. It's hard work, and I get the fruits of their labour for free! I really wanted it to work and that's why I persevered on and off for weeks trying to set it up. I am ranting about the fact that it's fiddly to make it work. That's really an ecosystem problem, I think.
I should probably document my process and submit a PR for Puput's docs, because there's so many little things that you have to get just right, otherwise it won't work. Yet even if I do that now, it'll already be outdated and wrong, and I have to work out the whole stack version balancing thing again.
I think it's fair to say that maybe Puput isn't for me, just as a consideration. And that's okay, really! Maybe Puput is for someone who already knows Django and Wagtail and is happy to tinker to make it all work for them.
- Django = handcraft your own site engine
- Wagtail = handcraft your own CMS
- Puput = handcraft your own blog..?
What the customer requested: a blog app written in python
What the customer really needed: a wordpress
So yeah, bugger it I'm on WordPress now. God's in his Heaven, All's right with the world.