python - TypeError: __init__() got an unexpected keyword argument 'image_field' -


i've profiles clinics , add images each of them. i'm trying use django-imaging , getting error. i've followed documentation , did following:

settings.py

installed_apps = (     'm1',     'django.contrib.admin',     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.messages',     'django.contrib.staticfiles',     'django.contrib.sites',     'django.contrib.sitemaps',     'imaging', 

models.py

from imaging.fields import imagingfield  class clinic(models.model):     name = models.charfield(max_length=500)     slug = models.charfield(max_length=200, unique = true)     photos = models.imagingfield() 

urls.py

url(r'^imaging/', include('imaging.urls')), 

i tried doing syncdband got following error:

traceback (most recent call last):   file "manage.py", line 10, in <module>     execute_from_command_line(sys.argv)   file "/library/python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line     utility.execute()   file "/library/python/2.7/site-packages/django/core/management/__init__.py", line 392, in execute     self.fetch_command(subcommand).run_from_argv(self.argv)   file "/library/python/2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv     self.execute(*args, **options.__dict__)   file "/library/python/2.7/site-packages/django/core/management/base.py", line 284, in execute     self.validate()   file "/library/python/2.7/site-packages/django/core/management/base.py", line 310, in validate     num_errors = get_validation_errors(s, app)   file "/library/python/2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors     (app_name, error) in get_app_errors().items():   file "/library/python/2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors     self._populate()   file "/library/python/2.7/site-packages/django/db/models/loading.py", line 75, in _populate     self.load_app(app_name, true)   file "/library/python/2.7/site-packages/django/db/models/loading.py", line 99, in load_app     models = import_module('%s.models' % app_name)   file "/library/python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module     __import__(name)   file "/users/harisaghadi/code/meddy production app/meddy1/models.py", line 10, in <module>     imaging.fields import imagingfield   file "/library/python/2.7/site-packages/django_imaging-1.0.0-py2.7.egg/imaging/fields.py", line 6, in <module>     imaging.models import image   file "/library/python/2.7/site-packages/django_imaging-1.0.0-py2.7.egg/imaging/models.py", line 22, in <module>     class image(models.model):   file "/library/python/2.7/site-packages/django_imaging-1.0.0-py2.7.egg/imaging/models.py", line 31, in image     options={'quality':90} typeerror: __init__() got unexpected keyword argument 'image_field' 

this bug in django imaging; see issue #11 in tracker:

django-imagekit has been updated , image_field kwarg has been renamed source, bug in django-imaging , needs fixed.

that rename took place quite time ago, in december 2012.

the work-around downgrade django-imagekit version 2.0.2, last release field still named image_field. however, project hasn't been maintained fix field rename 2 , half years ago perhaps not production worthy. issue #11 filed on year ago , hasn't been fixed in time.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -