google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

patch: Fix TinyMCE behavior #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following patch fixes the follwong problems with the TinyMCE widget:

1. Since it didn't accepts **kwargs like other widgets' __init__, creating
TinyMCE widgets from placeholders.py's get_widget() always raised a
TypeError and `language` parameter never passed in except, since it passes
 `page` which TinyMCE's __init__ didn't expect.

2. Using mutable in a function declaration is a bad idea. Pass None and
check for that in the function body. For more info see
http://www.python.org/doc/current/reference/compound_stmts.html#function-definit
ions

3. The hard coded `mce_attrs` in TinyMCE's __init__ overwrites
django-tinymce's TINYMCE_DEFAULT_CONFIG. One should be able to override
hard coded behavior with custom settings, so take it into account.

Cheers

Original issue reported on code.google.com by mkrih...@gmail.com on 15 Dec 2009 at 8:51

Attachments:

GoogleCodeExporter commented 9 years ago
Ignore it, I'll create it as pull request on github

Original comment by mkrih...@gmail.com on 17 Dec 2009 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 22 Dec 2009 at 10:22