Skip to main content

Simple template-based content swapping for CMS-less sites

Project description

Build Status Current PyPI release Download count

Change snippets of copy on your site, on the fly, for any application, and without a full-fledged CMS.

Solving queries like:

Hey, we need to change the greeting on login from “Hi!” to “Sup?”

And:

The footer copy needs to be udpated.

And:

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!

This is all simple stuff and it’s probably coded right into your templates. Changing it is easy enough, but requires a developer and then a release. Boo!

Usage

Just add addendum_tags to your templates:

{% load addendum_tags %}

{% snippet 'home:greeting' %}Hi!{% endsnippet %} {{ user.first_name }}

<footer>
  {% snippet 'home:footer' %}&copy; 2011 by Acme Corp.{% endsnippet %}
</footer>

Now you can edit content for these placeholders from the admin interface. If you don’t add anything or you delete text, the site text will always revert to what is in the template.

Use it for small bits of user modifiable text from any template on your site, and for swapping out lorem ipsum text when prototyping.

Find some more information in the docs.

Installation

Install the package from PyPI:

pip install django-addendum

Add it to your INSTALLED_APPS tuple:

INSTALLED_APPS += ('addendum')

Sync your database or migrate if you have South installed.

Contributing

Contributions are welcome but should follow some basic guidelines to make life easier:

  • Pull requests should be made from distinct branches that include only the reuqested changes branched from the canonical master branch.

  • Include tests for bug fixes and new features. Ensure that your Travis build is passing before submitting the pull request.

  • Include documentation for any new features.

  • For multi-commit updates please squash commits so the packager maintainer only has at most a few commits to review.

  • Please limit changes to your specific pull request (excluding extraneous changes and please do not bump the version for your own changes).

License

BSD licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-addendum-0.2.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_addendum-0.2.1-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-addendum-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django-addendum-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8eeb24e24740fe685451e29f82c998671a279707f4e8d8ffbe3f1fb11b093a20
MD5 943362bb1f99c573002d6bab8f7c84d2
BLAKE2b-256 31436e2cdbb14d4311379521c91753b5332adcb9c9723bc1191aa4a076469252

See more details on using hashes here.

File details

Details for the file django_addendum-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_addendum-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 367003940a64ac0cd70cbc2e52a526f27625d6c6a7478a481cc9bbd7d2416458
MD5 1a0b8b4212b27765c2cb5077cf3d13ee
BLAKE2b-256 ac3020c2747bc866dfd703a4bd2fb374c11068383d4747d0de6701e47ef47889

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page