real_content/templatetags/drc.py
def drc_paragraphs(no_of_paragraphs=1, css_class='', language=''):
    u"""
    Retrieve n random paragraphs.
    Uses langauge from global settings if an override is not provided.
    """
    language = get_language(language)
    paragraphs = get_text_file(language, 'paragraphs')

    random_paragraphs = random_lines(paragraphs, no_of_paragraphs)

    # fix when returning only 1 paragraph
    if isinstance(random_paragraphs, six.string_types):
        temp_list = []
        temp_list.append(random_paragraphs)
        random_paragraphs = temp_list

    data = {
        'paragraphs': random_paragraphs,
    }

    data['css_class'] = css_class
    return data
u"""
    Retrieve n random paragraphs.
    Uses langauge from global settings if an override is not provided.
    
u"""
Retrieve n random paragraphs.
Uses langauge from global settings if an override is not provided.
u " " " Retrieve n random paragraphs . Uses langauge from global settings if an override is not provided .
def drc_paragraphs(no_of_paragraphs=1, css_class='', language=''):
    language = get_language(language)
    paragraphs = get_text_file(language, 'paragraphs')
    random_paragraphs = random_lines(paragraphs, no_of_paragraphs)
    if isinstance(random_paragraphs, six.string_types):
        temp_list = []
        temp_list.append(random_paragraphs)
        random_paragraphs = temp_list
    data = {
        'paragraphs': random_paragraphs,
    }
    data['css_class'] = css_class
    return data
def drc_paragraphs ( no_of_paragraphs = 1 , css_class = '' , language = '' ) : language = get_language ( language ) paragraphs = get_text_file ( language , 'paragraphs' ) random_paragraphs = random_lines ( paragraphs , no_of_paragraphs ) if isinstance ( random_paragraphs , six . string_types ) : temp_list = [ ] temp_list . append ( random_paragraphs ) random_paragraphs = temp_list data = { 'paragraphs' : random_paragraphs , } data [ 'css_class' ] = css_class return data
u"""
Retrieve n random paragraphs.
u " " " Retrieve n random paragraphs .
u"""
    Retrieve n random paragraphs.
    Uses langauge from global settings if an override is not provided.
    """ # fix when returning only 1 paragraph
no_of_paragraphs
css_class
language