Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django-tinymce4: got an unexpected keyword argument 'profile' #133

Closed
akolpakov opened this issue Sep 14, 2015 · 4 comments
Closed

django-tinymce4: got an unexpected keyword argument 'profile' #133

akolpakov opened this issue Sep 14, 2015 · 4 comments
Labels

Comments

@akolpakov
Copy link

Traceback:

File ".../sandbox/lib/python2.7/site-packages/django/contrib/admin/options.py", line 675, in get_form
    fields = flatten_fieldsets(self.get_fieldsets(request, obj))
  File ".../sandbox/lib/python2.7/site-packages/django/contrib/admin/options.py", line 354, in get_fieldsets
    return [(None, {'fields': self.get_fields(request, obj)})]
  File ".../sandbox/lib/python2.7/site-packages/django/contrib/admin/options.py", line 664, in get_fields
    form = self.get_form(request, obj, fields=None)
  File ".../sandbox/lib/python2.7/site-packages/django/contrib/admin/options.py", line 700, in get_form
    return modelform_factory(self.model, **defaults)
  File ".../sandbox/lib/python2.7/site-packages/django/forms/models.py", line 545, in modelform_factory
    return type(form)(class_name, (form,), form_class_attrs)
  File ".../sandbox/lib/python2.7/site-packages/django/forms/models.py", line 285, in __new__
    opts.help_texts, opts.error_messages)
  File ".../sandbox/lib/python2.7/site-packages/django/forms/models.py", line 216, in fields_for_model
    formfield = formfield_callback(f, **kwargs)
  File ".../sandbox/lib/python2.7/site-packages/django/contrib/admin/options.py", line 210, in formfield_for_dbfield
    return db_field.formfield(**kwargs)
  File ".../sandbox/lib/python2.7/site-packages/tinymce/models.py", line 31, in formfield
    profile=self.tinymce_profile)
TypeError: __init__() got an unexpected keyword argument 'profile'

At https://github.com/aljosa/django-tinymce/blob/tinymce4/tinymce/widgets.py#L103:

class AdminTinyMCE(admin_widgets.AdminTextareaWidget, TinyMCE):
    pass

__init__ from the first parent is called and it takes unexpected keyword.

You can swap parents

@dani0805
Copy link

dani0805#1

It's here, I am aware of the problem. If you can do a pull request I'll merge it, otherwise I'll fix it in a little while.

@websensei
Copy link

any updates on this? struggling with the same error

@illozzam
Copy link

Same error here...

@vanadium23 vanadium23 added the bug label Feb 29, 2016
@dani0805
Copy link

dani0805 commented Jun 6, 2016

its closed now

@Natim Natim closed this as completed Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants