# Path: basic_cms/settings.py
# def get_setting(*args, **kwargs):
# def get_page_templates():
# TEMPLATES = get_setting('TEMPLATES', raise_error=True)
# PAGE_DEFAULT_TEMPLATE = get_setting('PAGE_DEFAULT_TEMPLATE',
#     'DEFAULT_PAGE_TEMPLATE', raise_error=True)
# PAGE_TEMPLATES = get_setting('PAGE_TEMPLATES',
#     default_value=())
# PAGE_TINYMCE = getattr(settings, 'PAGE_TINYMCE', False)
# PAGE_UNIQUE_SLUG_REQUIRED = getattr(settings, 'PAGE_UNIQUE_SLUG_REQUIRED',
#                                     True)
# PAGE_CONTENT_REVISION = getattr(settings, 'PAGE_CONTENT_REVISION', True)
# PAGE_CONTENT_REVISION_DEPTH = getattr(settings,
#     'PAGE_CONTENT_REVISION_DEPTH', 10)
# PAGE_LANGUAGES = get_setting('PAGE_LANGUAGES', raise_error=True)
# PAGE_DEFAULT_LANGUAGE = get_setting('PAGE_DEFAULT_LANGUAGE',
#     'LANGUAGE_CODE', raise_error=True)
# PAGE_EXTRA_PERMISSIONS = getattr(settings, 'PAGE_EXTRA_PERMISSIONS', extra)
# PAGE_LANGUAGE_MAPPING = getattr(settings, 'PAGE_LANGUAGE_MAPPING', lambda l: l)
# SITE_ID = getattr(settings, 'SITE_ID', 1)
# PAGE_USE_SITE_ID = getattr(settings, 'PAGE_USE_SITE_ID', False)
# PAGE_HIDE_SITES = getattr(settings, 'PAGE_HIDE_SITES', False)
# PAGE_USE_LANGUAGE_PREFIX = getattr(settings, 'PAGE_USE_LANGUAGE_PREFIX',
#                                                                         False)
# PAGE_USE_STRICT_URL = getattr(settings, 'PAGE_USE_STRICT_URL', False)
# PAGE_CONTENT_REVISION_EXCLUDE_LIST = getattr(settings,
#     'PAGE_CONTENT_REVISION_EXCLUDE_LIST', ()
# )
# PAGE_SANITIZE_USER_INPUT = getattr(settings, 'PAGE_SANITIZE_USER_INPUT', False)
# PAGES_MEDIA_URL = get_setting('PAGES_MEDIA_URL')
#     PAGES_MEDIA_URL = str(media_url) + 'pages/'
# PAGE_HIDE_ROOT_SLUG = getattr(settings, 'PAGE_HIDE_ROOT_SLUG', False)
# PAGE_SHOW_START_DATE = getattr(settings, 'PAGE_SHOW_START_DATE', False)
# PAGE_SHOW_END_DATE = getattr(settings, 'PAGE_SHOW_END_DATE', False)
# PAGE_CONNECTED_MODELS = getattr(settings, 'PAGE_CONNECTED_MODELS', False)
# PAGE_LINK_FILTER = getattr(settings, 'PAGE_LINK_FILTER', False)
# PAGE_EXTRA_CONTEXT = getattr(settings, 'PAGE_EXTRA_CONTEXT', None)
# PAGE_UPLOAD_ROOT = getattr(settings, 'PAGE_UPLOAD_ROOT', 'upload')
# PAGE_ENABLE_TESTS = getattr(settings, 'PAGE_ENABLE_TESTS', False)
# PAGE_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
# PAGE_AUTOMATIC_SLUG_RENAMING = getattr(settings, 'PAGE_AUTOMATIC_SLUG_RENAMING', False)
# INSTALLED_APPS = getattr(settings, 'INSTALLED_APPS',
#                          ())
# FILEBROWSER_DIRECTORY = False
#     FILEBROWSER_DIRECTORY = getattr(settings, 'FILEBROWSER_DIRECTORY',
#                                     getattr(filebrowser_settigns, 'DIRECTORY', False))
# PAGE_ADD_API = getattr(settings, 'PAGE_ADD_API', True)


from lxml import etree
    from urllib.parse import urljoin
    from urlparse import urljoin
from basic_cms import settings
from django import template
from django.template import TemplateDoesNotExist
from django.template import loader, Context
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from datetime import datetime
    from django.contrib.auth import get_user_model
    from .models import Page
    from .models import Page
    from django.template.loader_tags import BlockNode
    from basic_cms.models import Page, Content
    from basic_cms.models import Page, Content
import json as simplejson
        import sys
    import polib
    import os
    import polib
        import sys

        # extends node?
        if hasattr(node, 'parent_name'):
            _placeholders_recursif(node.get_parent(dummy_context).nodelist,
                                                        plist, blist)
        # include node?
        elif hasattr(node, 'template') and hasattr(node.template, 'nodelist'):
            _placeholders_recursif(node.template.nodelist, plist, blist)

        # Is it a placeholder?
        if hasattr(node, 'page') and hasattr(node, 'parsed') and \
                hasattr(node, 'as_varname') and hasattr(node, 'name'):
            already_in_plist = False
            for placeholder in plist:
                if placeholder.name == node.name:
                    already_in_plist = True
            if not already_in_plist:
                if len(blist):
                    node.found_in_block = blist[len(blist) - 1]
                plist.append(node)
            node.render(Context())

        for key in ('nodelist', 'nodelist_true', 'nodelist_false'):
            if isinstance(node, BlockNode):
                # delete placeholders found in a block of the same name
                offset = 0
                _plist = [(i, v) for i, v in enumerate(plist)]
                for index, pl in _plist:
                    if pl.found_in_block and \
                            pl.found_in_block.name == node.name \

# Path: basic_cms/settings.py
# def get_setting(*args, **kwargs):
# def get_page_templates():
# TEMPLATES = get_setting('TEMPLATES', raise_error=True)
# PAGE_DEFAULT_TEMPLATE = get_setting('PAGE_DEFAULT_TEMPLATE',
#     'DEFAULT_PAGE_TEMPLATE', raise_error=True)
# PAGE_TEMPLATES = get_setting('PAGE_TEMPLATES',
#     default_value=())
# PAGE_TINYMCE = getattr(settings, 'PAGE_TINYMCE', False)
# PAGE_UNIQUE_SLUG_REQUIRED = getattr(settings, 'PAGE_UNIQUE_SLUG_REQUIRED',
#                                     True)
# PAGE_CONTENT_REVISION = getattr(settings, 'PAGE_CONTENT_REVISION', True)
# PAGE_CONTENT_REVISION_DEPTH = getattr(settings,
#     'PAGE_CONTENT_REVISION_DEPTH', 10)
# PAGE_LANGUAGES = get_setting('PAGE_LANGUAGES', raise_error=True)
# PAGE_DEFAULT_LANGUAGE = get_setting('PAGE_DEFAULT_LANGUAGE',
#     'LANGUAGE_CODE', raise_error=True)
# PAGE_EXTRA_PERMISSIONS = getattr(settings, 'PAGE_EXTRA_PERMISSIONS', extra)
# PAGE_LANGUAGE_MAPPING = getattr(settings, 'PAGE_LANGUAGE_MAPPING', lambda l: l)
# SITE_ID = getattr(settings, 'SITE_ID', 1)
# PAGE_USE_SITE_ID = getattr(settings, 'PAGE_USE_SITE_ID', False)
# PAGE_HIDE_SITES = getattr(settings, 'PAGE_HIDE_SITES', False)
# PAGE_USE_LANGUAGE_PREFIX = getattr(settings, 'PAGE_USE_LANGUAGE_PREFIX',
#                                                                         False)
# PAGE_USE_STRICT_URL = getattr(settings, 'PAGE_USE_STRICT_URL', False)
# PAGE_CONTENT_REVISION_EXCLUDE_LIST = getattr(settings,
#     'PAGE_CONTENT_REVISION_EXCLUDE_LIST', ()
# )
# PAGE_SANITIZE_USER_INPUT = getattr(settings, 'PAGE_SANITIZE_USER_INPUT', False)
# PAGES_MEDIA_URL = get_setting('PAGES_MEDIA_URL')
#     PAGES_MEDIA_URL = str(media_url) + 'pages/'
# PAGE_HIDE_ROOT_SLUG = getattr(settings, 'PAGE_HIDE_ROOT_SLUG', False)
# PAGE_SHOW_START_DATE = getattr(settings, 'PAGE_SHOW_START_DATE', False)
# PAGE_SHOW_END_DATE = getattr(settings, 'PAGE_SHOW_END_DATE', False)
# PAGE_CONNECTED_MODELS = getattr(settings, 'PAGE_CONNECTED_MODELS', False)
# PAGE_LINK_FILTER = getattr(settings, 'PAGE_LINK_FILTER', False)
# PAGE_EXTRA_CONTEXT = getattr(settings, 'PAGE_EXTRA_CONTEXT', None)
# PAGE_UPLOAD_ROOT = getattr(settings, 'PAGE_UPLOAD_ROOT', 'upload')
# PAGE_ENABLE_TESTS = getattr(settings, 'PAGE_ENABLE_TESTS', False)
# PAGE_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
# PAGE_AUTOMATIC_SLUG_RENAMING = getattr(settings, 'PAGE_AUTOMATIC_SLUG_RENAMING', False)
# INSTALLED_APPS = getattr(settings, 'INSTALLED_APPS',
#                          ())
# FILEBROWSER_DIRECTORY = False
#     FILEBROWSER_DIRECTORY = getattr(settings, 'FILEBROWSER_DIRECTORY',
#                                     getattr(filebrowser_settigns, 'DIRECTORY', False))
# PAGE_ADD_API = getattr(settings, 'PAGE_ADD_API', True)


# Path: basic_cms/utils.py
from lxml import etree
    from urllib.parse import urljoin
    from urlparse import urljoin
from basic_cms import settings
from django import template
from django.template import TemplateDoesNotExist
from django.template import loader, Context
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from datetime import datetime
    from django.contrib.auth import get_user_model
    from .models import Page
    from .models import Page
    from django.template.loader_tags import BlockNode
    from basic_cms.models import Page, Content
    from basic_cms.models import Page, Content
import json as simplejson
        import sys
    import polib
    import os
    import polib
        import sys


        # extends node?
        if hasattr(node, 'parent_name'):
            _placeholders_recursif(node.get_parent(dummy_context).nodelist,
                                                        plist, blist)
        # include node?
        elif hasattr(node, 'template') and hasattr(node.template, 'nodelist'):
            _placeholders_recursif(node.template.nodelist, plist, blist)

        # Is it a placeholder?
        if hasattr(node, 'page') and hasattr(node, 'parsed') and \
                hasattr(node, 'as_varname') and hasattr(node, 'name'):
            already_in_plist = False
            for placeholder in plist:
                if placeholder.name == node.name:
                    already_in_plist = True
            if not already_in_plist:
                if len(blist):
                    node.found_in_block = blist[len(blist) - 1]
                plist.append(node)
            node.render(Context())

        for key in ('nodelist', 'nodelist_true', 'nodelist_false'):
            if isinstance(node, BlockNode):
                # delete placeholders found in a block of the same name
                offset = 0
                _plist = [(i, v) for i, v in enumerate(plist)]
                for index, pl in _plist:
                    if pl.found_in_block and \
                            pl.found_in_block.name == node.name \

                            and pl.found_in_block != node: