mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-05-01 18:04:42 +00:00
Rename spec_args to spec_attrs
This commit is contained in:
parent
7532e5040b
commit
5a414a3644
1 changed files with 3 additions and 3 deletions
|
|
@ -233,14 +233,14 @@ class SpecHost(object):
|
|||
"""
|
||||
def __init__(self, spec=None, spec_id=None, **kwargs):
|
||||
|
||||
spec_args = dict((k, v) for k, v in kwargs.items() if v is not None)
|
||||
spec_attrs = dict((k, v) for k, v in kwargs.items() if v is not None)
|
||||
|
||||
if spec_args:
|
||||
if spec_attrs:
|
||||
if spec:
|
||||
raise TypeError('You can provide either an image spec or'
|
||||
' arguments for the ImageSpec constructor, but not both.')
|
||||
else:
|
||||
spec = type('Spec', (ImageSpec,), spec_args) # TODO: Base class name on spec id?
|
||||
spec = type('Spec', (ImageSpec,), spec_attrs) # TODO: Base class name on spec id?
|
||||
|
||||
self._original_spec = spec
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue