# Path: statik/utils.py
# def uncapitalize(s):
#     """If the given string begins with a capital letter, it converts it to lowercase."""
#     return (s[:1].lower() + s[1:]) if s else ""


from statik.utils import uncapitalize
    exit_code = 4

    def __init__(self, model_name, pk=None, **kwargs):
        super(DataError, self).__init__(**kwargs)
        self.model_name = model_name
        self.pk = pk
    
    def get_error_message(self):
        return "For model \"%s\",%s %s" % (
            self.model_name,
            (" pk=\"%s\", " % self.pk) if self.pk else "",
            self.error_message
        )


class TemplateError(StatikError):
    error_kind = "Template error"
    exit_code = 5


class ViewError(StatikError):
    error_kind = "View error"
    exit_code = 6

    def __init__(self, view_name=None, **kwargs):
        super(ViewError, self).__init__(**kwargs)
        self.view_name = view_name
    
    def get_error_message(self):
        return (

# Path: statik/utils.py
# def uncapitalize(s):
#     """If the given string begins with a capital letter, it converts it to lowercase."""
#     return (s[:1].lower() + s[1:]) if s else ""


# Path: statik/errors.py
from statik.utils import uncapitalize

    exit_code = 4

    def __init__(self, model_name, pk=None, **kwargs):
        super(DataError, self).__init__(**kwargs)
        self.model_name = model_name
        self.pk = pk
    
    def get_error_message(self):
        return "For model \"%s\",%s %s" % (
            self.model_name,
            (" pk=\"%s\", " % self.pk) if self.pk else "",
            self.error_message
        )


class TemplateError(StatikError):
    error_kind = "Template error"
    exit_code = 5


class ViewError(StatikError):
    error_kind = "View error"
    exit_code = 6

    def __init__(self, view_name=None, **kwargs):
        super(ViewError, self).__init__(**kwargs)
        self.view_name = view_name
    
    def get_error_message(self):
        return (

            "In view \"%s\", %s" % (self.view_name, uncapitalize(self.error_message))