django-flatblocks icon indicating copy to clipboard operation
django-flatblocks copied to clipboard

Support for providing a default text for the block

Open mandx opened this issue 13 years ago • 6 comments

Consider this syntax:

{% flatblock "page.info" %}
Here goes the default text of the flatblock named "page.info". When defining this block
the tag search for the flatblog with this name and include it's content. If the flatblock doesn't
exists, it would automatically create the flatblock record and fill the contents with this
very same text.
{% endflatblock %}

That way, the admin usage of flatblocks is reduced, and the final user only needs to change the needed flatblocks, and it's easier for the user to locate the right flatblock to edit because he can see the default contents that's being displayed, besides the flatblock's name. Also there's no need to create the flatblocks in the admin, the are created as needed (as the template gets rendered), and therefore ready to edit.

This is a better way to provide initial data from the designers, since they don't have to mess around with fixtures.

mandx avatar Jun 15 '11 17:06 mandx