real_content/templatetags/drc.py
def drc_title(tag='h1', css_class='', language=''):
    u"""
    Retrieve random title.
    Uses langauge from global settings if an override is not provided.
    """
    language = get_language(language)
    titles = get_text_file(language, 'titles')

    data = {
        'title': random_lines(titles, 1),
    }

    # backwards compatibility with 0.1.5 - if only heading size was sent
    try:
        tag = int(tag)
        if tag > 6:
            tag = 6
        tag = 'h{}'.format(tag)
    except ValueError:
        pass

    # make sure that only/at least one word is the tag
    # (important for closing tags)
    try:
        data['tag'] = tag.split()[0]
    except IndexError:
        data['tag'] = 'h1'

    data['css_class'] = css_class
    return data
u"""
    Retrieve random title.
    Uses langauge from global settings if an override is not provided.
    
u"""
Retrieve random title.
Uses langauge from global settings if an override is not provided.
u " " " Retrieve random title . Uses langauge from global settings if an override is not provided .
def drc_title(tag='h1', css_class='', language=''):
    language = get_language(language)
    titles = get_text_file(language, 'titles')
    data = {
        'title': random_lines(titles, 1),
    }
    try:
        tag = int(tag)
        if tag > 6:
            tag = 6
        tag = 'h{}'.format(tag)
    except ValueError:
        pass
    try:
        data['tag'] = tag.split()[0]
    except IndexError:
        data['tag'] = 'h1'
    data['css_class'] = css_class
    return data
def drc_title ( tag = 'h1' , css_class = '' , language = '' ) : language = get_language ( language ) titles = get_text_file ( language , 'titles' ) data = { 'title' : random_lines ( titles , 1 ) , } try : tag = int ( tag ) if tag > 6 : tag = 6 tag = 'h{}' . format ( tag ) except ValueError : pass try : data [ 'tag' ] = tag . split ( ) [ 0 ] except IndexError : data [ 'tag' ] = 'h1' data [ 'css_class' ] = css_class return data
u"""
Retrieve random title.
u " " " Retrieve random title .
u"""
    Retrieve random title.
    Uses langauge from global settings if an override is not provided.
    """ # backwards compatibility with 0.1.5 - if only heading size was sent # make sure that only/at least one word is the tag # (important for closing tags)
tag
css_class
language