Esempio n. 1
0
 def inner(self, *args, **kwargs):
     pre_command.send(self.__class__, args=args, kwargs=kwargs)
     ret = func(self, *args, **kwargs)
     post_command.send(self.__class__,
                       args=args,
                       kwargs=kwargs,
                       outcome=ret)
     return ret
    def handle(self, *args, **options):
        pre_command.send(self.__class__)
        
        apps = set()
        if not args:
            apps = get_all_apps()
        else:
            for arg in args:
                apps.add(get_app(arg))

        for app in apps:
            create_permissions(app, get_models(), int(options.get('verbosity', 3)))

        post_command.send(self.__class__)
Esempio n. 3
0
 def inner(self, *args, **kwargs):
     pre_command.send(self.__class__, args=args, kwargs=kwargs)
     ret = func(self, *args, **kwargs)
     post_command.send(self.__class__, args=args, kwargs=kwargs, outcome=ret)
     return ret