def url(self, context, force=True): """ Override .url to use hashed url in development """ try: try: if context == "djangocms_text_ckeditor/js/dist/bundle-45a646fecc.cms.ckeditor.min.js": context = "djangocms_text_ckeditor/js/dist/bundle-bca0d2d3f4.cms.ckeditor.min.js" try: return super(ManifestStaticFilesStorage, self).url(context, True) except ValueError: # Solve the reverted https://github.com/divio/django-cms/pull/5860/ new_context = static_with_version(context) return super(ManifestStaticFilesStorage, self).url(new_context, True).replace(__version__, "") except: if context == "djangocms_text_ckeditor/js/dist/bundle-bca0d2d3f4.cms.ckeditor.min.js": context = "djangocms_text_ckeditor/js/dist/bundle-45a646fecc.cms.ckeditor.min.js" try: return super(ManifestStaticFilesStorage, self).url(context, True) except ValueError: # Solve the reverted https://github.com/divio/django-cms/pull/5860/ new_context = static_with_version(context) return super(ManifestStaticFilesStorage, self).url(new_context, True).replace(__version__, "") except: pass
class Media: css = {'all': (static_with_version('cms/css/cms.wizard.css'), )} js = ( static_with_version('cms/js/dist/bundle.admin.base.min.js'), 'cms/js/modules/cms.wizards.js', ) js = tuple(map(static_with_version, js))
def media(self): return forms.Media( css={'all': ('djangocms_text_ckeditor/css/cms.ckeditor.css', )}, js=( static_with_version('cms/js/dist/bundle.admin.base.min.js'), static(PATH_TO_JS), ))
class Media: css = { 'all': ( 'cms/js/select2/select2.css', 'cms/js/select2/select2-bootstrap.css', ) } js = (static_with_version( 'cms/js/dist/bundle.forms.pagesmartlinkwidget.min.js'), )
def media(self): return forms.Media( css={ 'all': ('djangocms_text_ckeditor/css/cms.ckeditor.css',) }, js=( static_with_version('cms/js/dist/bundle.admin.base.min.js'), static(PATH_TO_JS), ) )
def url(self, context, force=True): """ Override .url to use hashed url in development """ try: return super(ManifestStaticFilesStorage, self).url(context, True) except ValueError: # Solve the reverted https://github.com/divio/django-cms/pull/5860/ context = static_with_version(context) return super(ManifestStaticFilesStorage, self).url(context, True).replace(__version__, "")
class Media(object): """ Media class copy pasted from the AdminFileWidget, otherwise it wont get rendered. On option would be to use a MultiWidget and render the different fields like that but I had a lot of troubles with this approach. Maybe there's a better way then just copy pasting it? Reflection? """ css = { 'all': [ 'filer/css/admin_filer.css', ] } js = ( static_with_version( 'cms/js/dist/bundle.forms.pageselectwidget.min.js'), 'filer/js/libs/dropzone.min.js', 'filer/js/addons/dropzone.init.js', 'filer/js/addons/popup_handling.js', 'filer/js/addons/widget.js', )
class Media: js = ( 'admin/js/urlify.js', static_with_version('cms/js/dist/bundle.forms.slugwidget.min.js'), )
def url(self, context): url = super(StaticWithVersionNode, self).url(context) return static_with_version(url)
def url(self, context): self.path.var = static_with_version(self.path.resolve(context)) return super(StaticWithVersionNode, self).url(context)
class Media: js = (static_with_version( 'cms/js/dist/bundle.forms.apphookselect.min.js'), )
class Media: js = (static_with_version( 'cms/js/dist/bundle.forms.pageselectwidget.min.js'), )
def url(self, context): path = self.path.resolve(context) path_with_version = static_with_version(path) return self.handle_simple(path_with_version)
class Media: js = ( static_with_version('cms/js/dist/bundle.admin.base.min.js'), static(PATH_TO_JS), ) css = {'all': {'djangocms_text_ckeditor/css/cms.ckeditor.css'}}