Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-copyblock 0.5.3

    Download button

    No screenshots available
    Downloads: 147  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steve Ivy | More programs
    MIT/X Consortium Lic... / FREE
    February 10th, 2012, 20:36 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-copyblock description

    Manage website copy as a directory of markdown-formatted files

    Developer comments

    django-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, 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:

    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


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    website copy | copy website | Django | website | copy

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM