mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
generateimages: fix taking arguments
This commit is contained in:
parent
364cd49278
commit
a153812add
1 changed files with 5 additions and 3 deletions
|
|
@ -12,13 +12,15 @@ segments. (Segments are separated with colons.) So, for example,
|
|||
"a:*:c" will match "a:b:c", but not "a:b:x:c", whereas "a:**:c" will
|
||||
match both. Subsegments are always matched, so "a" will match "a" as
|
||||
well as "a:b" and "a:b:c".""")
|
||||
args = '[generator_ids]'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('generator_id', nargs='*', help='<app_name>:<model>:<field> for model specs')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
generators = generator_registry.get_ids()
|
||||
|
||||
if args:
|
||||
patterns = self.compile_patterns(args)
|
||||
if options['generator_id']:
|
||||
patterns = self.compile_patterns(options['generator_id'])
|
||||
generators = (id for id in generators if any(p.match(id) for p in patterns))
|
||||
|
||||
for generator_id in generators:
|
||||
|
|
|
|||
Loading…
Reference in a new issue