Metadata-Version: 1.0
Name: django-copyblock
Version: 0.4.1
Summary: Manage website copy as a directory of markdown-formatted files. Insert files as copy into your Django templates.
Home-page: http://github.com/sivy/django-copyblock/
Author: Steve Ivy
Author-email: steve@wallrazer.com
License: MIT License
Description: # Copyblock
        
        Copyblock came out of a desire of mine to separate the copy for a site I'm working on from the site templates. Things like welcome messages, intro copy for forms, etc. This is copy I'd like to be able to tweak easily over time without having to redeploy the entire site to make it happen. What I wanted was a system kindof like gettext, but without .po files, the weird syntax, and a separete app to generate the right files.
        
        What I wanted was really simple: a directory of text files, optionally in [Markdown](http://daringfireball.net/projects/markdown), that could be inserted into my app templates with a template tag. That's what Copyblock does.
        
        ## Installation
        
        From Pypi:
        
            % pip install django-copyblock
        
        From [Github](http://github.comsivy/django-copyblock):
        
            % pip install -e git://github.com/sivy/django-copyblock.git#egg=copyblock
        
        ## Usage
        
        Create a root directory for your copyblock files:
        
            %  mkdir copy/dir
        
        Add this path to your settings file:
        
            COPYBLOCK_ROOT='path/to/your/copy/dir'
        
        In your templates:
        
            {% copyblock filename %}
        
        This will do the following:
        
        * Look for copy/dir/filename.markdown
        * Run the file filename.markdown through markdown
        * Cache the output for future lookups
        * Insert the output in the rendered template
        
         Right now, copyblock only does markdown. If your copy is not in markdown (plain text), you can pass in the `nomarkdown` parameter to the template tag:
        
            {% copyblock filename nomarkdown %}
        
         Also, if you don't want to use the in-memory cache (load copy from file every time, good for copy editing), pass in the `nocache` parameter:
        
            {% copyblock filename nocache %}
        
        When working on site copy, it can be helpful to turn off the Copyblock cache completely with (in `settings.py`):
        
            COPYBLOCK_CACHE=False
        
        ## @TODO
        
        * Add support for other text formats, or even HTML (suggestions, request? <steve@wallrazer.com>)
        * A view that will render any file in `settings.COPYBLOCK_ROOT` through the site's base template (`base.html`) under a path determined by `urls.py`. IE, `/path/to/copy/dir/foo.markdown` would be viewable at `yoursite.com/somepath/foo`. Or, something like that.
Keywords: django copy markdown
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Framework :: Django
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Utilities
