# Path: airy/core/conf.py
# class Settings(object):
#     def __init__(self, **entries):
#     def __getattribute__(self, name):
# def _ensure_defaults(dsettings, options, project_root, config_filename):
# def _preconfigure(project_root, config_filename='settings.py', argv=[]):


from airy.core.conf import settings
from mongoengine.queryset import DoesNotExist
from users.auth import get_current_user

def login_required(function):

    def wrapped(handler, *args, **kwargs):
        if get_current_user(handler):
            return function(handler, *args, **kwargs)

# Path: airy/core/conf.py
# class Settings(object):
#     def __init__(self, **entries):
#     def __getattribute__(self, name):
# def _ensure_defaults(dsettings, options, project_root, config_filename):
# def _preconfigure(project_root, config_filename='settings.py', argv=[]):


# Path: airy/skeleton/project/users/decorators.py
from airy.core.conf import settings
from mongoengine.queryset import DoesNotExist
from users.auth import get_current_user


def login_required(function):

    def wrapped(handler, *args, **kwargs):
        if get_current_user(handler):
            return function(handler, *args, **kwargs)

        else: