# Path: common_configs/utils.py
# def merge_items(base, new_items):
#     """
#     Merges two lists and eliminates duplicates
# 
#     :type base: list
#     :type new_items: list
#     :rtype: list
#     """
#     for item in new_items:
#         if not item in base:
#             base = base + [item]
#     return base


from configurations.values import BooleanValue, Value
from ..utils import merge_items
#-*- coding: utf-8 -*-

"""
Settings for django-crispy-forms_ - the best way to have DRY Django forms

.. _django-crispy-forms: https://github.com/maraujop/django-crispy-forms
"""

from __future__ import absolute_import, division, print_function, unicode_literals




class CrispyForms(object):

    #: Template pack
    CRISPY_TEMPLATE_PACK = Value("bootstrap3")

    #: Don't suppress errors unless explicitly set
    CRISPY_FAIL_SILENTLY = BooleanValue(False)

    @property
    def INSTALLED_APPS(self):
        """
        Appends :mod:`crispy_forms` to list of ``INSTALLED_APPS``.
        """

# Path: common_configs/utils.py
# def merge_items(base, new_items):
#     """
#     Merges two lists and eliminates duplicates
# 
#     :type base: list
#     :type new_items: list
#     :rtype: list
#     """
#     for item in new_items:
#         if not item in base:
#             base = base + [item]
#     return base


# Path: common_configs/apps/forms.py
from configurations.values import BooleanValue, Value
from ..utils import merge_items

#-*- coding: utf-8 -*-

"""
Settings for django-crispy-forms_ - the best way to have DRY Django forms

.. _django-crispy-forms: https://github.com/maraujop/django-crispy-forms
"""

from __future__ import absolute_import, division, print_function, unicode_literals




class CrispyForms(object):

    #: Template pack
    CRISPY_TEMPLATE_PACK = Value("bootstrap3")

    #: Don't suppress errors unless explicitly set
    CRISPY_FAIL_SILENTLY = BooleanValue(False)

    @property
    def INSTALLED_APPS(self):
        """
        Appends :mod:`crispy_forms` to list of ``INSTALLED_APPS``.
        """

        return merge_items(super(CrispyForms, self).INSTALLED_APPS, [