Easily edit arbitrary text snippets on a site without a full-fledged CMS or issuing another site release. Like a mini-CMS for every site.
Surely, you’ve never built a site and later heard:
Hey, we need to change the greeting on login from “Hi!” to “Sup?”
The footer copy needs to be udpated.
The marketing team would really like to be able to change that message on a monthly basis. I don’t care that that’s a third-party appliwhoozitz!
No, of course not!
This is usually basic boilerplate or one-off marketing copy. And usually it doesn’t need to change. Usually. When you do need to change it, the site managers or content editors have to wait for a new release from someone else.
The answer to editing site content is a content management system. But while a full CMS is the right answer for a publishing site, it’s not for many sites.
For data driven applications (like the assessment tracking system we developed) or user driven application (like BuzzTown, with its local business generated content) there isn’t a need to have a typical page driven CMS. Instead the need is to update copy here and there, usually nothing that demands the likes of a Django CMS.
Django-Addendum allows you to delineate short snippets of code that should be editable by a site administrator if necessary, but that also shouldn’t require user input.
Let’s say you have some footer text:
That’s the copy the team decided to go with, so that’s now coded into the base template.
But it’s not 2012 anymore! Well, we can solve the copyright year issue with a template tag so it’s always up to date, but a month later the sales team says the company is now the first best. And then a month later everyone finds out that the company is actually the best in the galaxy.
It’s a simple change, but the marketing director wants the changes made right away, and each time she makes the request the development team is at a beer making offsite meeting.
Let’s make those snippets editable:
By default it’ll look like the first example:
But once some content has been added for the matching keys, it shows what the content manager added:
And of course the base language can always be changed later to keep the codebase up to date - or not. Does it really matter anymore?
Django-Addendum is very basic by design. It’s made with the primary site content managers in mind, not just any user. You also need to know how the snippet keys have been named. That’s probably the biggest drawback right now, and something we’re keen to update in the future.
Learn from more articles like this how to make the most out of your existing Django site.