Jumbo relies on some patches to the official django version that can be applied using the function jmb.core.monkey.patch() in urls.py:
from jmb.core import monkey
monkey.patch()
Apply all patches Jumbo relyes on. Currently management commands, jquery, and timepicker
Parameters: | exclude – a list of strings naming the patches that will not be applied. ‘jquery’ patch will only be applied if cms is in INSTALLED_APPS |
---|
Django find_management_module fails at finding modules when namespaces are used.
This version of find_management_module tries a real import when django fails to find the module. The difference is that django only uses:
imp.find_module(...)
that doesn’t implement full module search algorithm. We’re going to place this code in urls.py:
from jmb.core import monkey
monkey.fix_find_namespaces()
At the moment there’s an open ticket
MonkeyPatch django-cms not to overwrite jquery.
While django make attention to use djangojQuery and not to overwite standard $(), so different versions can coexist, PageAdmin and PluginEditor overwrite it with django.jQuery. Utilizzata in urls.py cosi:
from jmb.core import monkey
if settings.CMS_ENABLED:
urlpatterns += patterns('',
url(r'^', include('cms.urls')),
)
monkey.patch_cms_page_not_to_overwrite_jquery()
Datetime and time widgets in Django are pretty poor ones.
Html widgets used by admin are defined in django.contrib.admin.options in a dict named FORMFIELD_FOR_DBFIELD_DEFAULTS.
We overwrite it in jmb.core.admin.options and define a widget that is derived from jQuery.ui‘s default one.