示例#1
0
 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
示例#2
0
    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))
示例#3
0
 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),
         ))
示例#4
0
 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'), )
示例#5
0
 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),
         )
     )
示例#6
0
 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__, "")
示例#7
0
 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',
     )
示例#8
0
 class Media:
     js = (
         'admin/js/urlify.js',
         static_with_version('cms/js/dist/bundle.forms.slugwidget.min.js'),
     )
示例#9
0
 def url(self, context):
     url = super(StaticWithVersionNode, self).url(context)
     return static_with_version(url)
示例#10
0
 def url(self, context):
     self.path.var = static_with_version(self.path.resolve(context))
     return super(StaticWithVersionNode, self).url(context)
示例#11
0
 class Media:
     js = (static_with_version(
         'cms/js/dist/bundle.forms.apphookselect.min.js'), )
示例#12
0
 class Media:
     js = (static_with_version(
         'cms/js/dist/bundle.forms.pageselectwidget.min.js'), )
示例#13
0
    def url(self, context):
        path = self.path.resolve(context)
        path_with_version = static_with_version(path)

        return self.handle_simple(path_with_version)
示例#14
0
 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'}}