Coder Social home page Coder Social logo

aldryn-gallery's People

Contributors

astagi avatar bogdal avatar chive avatar czpython avatar digi604 avatar finalangel avatar jmelett avatar lionardo avatar mikek avatar stefanfoulis avatar yakky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aldryn-gallery's Issues

Error in template/plugins/slide_folder.html

Line 2 is: {% include slide_template with instance=none %}

Line 2 should be
{% include slide_template with instance=image %}

Otherwise the folder will not populate slides.

ImproperlyConfigured: CMS Plugins must define a render template or set render_plugin=False

Hey

version 0.3.0 gives me the error

ImproperlyConfigured: CMS Plugins must define a render template or set render_plugin=False: <class 'aldryn_gallery.cms_plugins.SlideCMSPlugin'>

and I can solve it only when adding the line

render_template = False

to the SlideCMSPlugin class in cms_plugins.py. I am using Python 2.7 with Django 1.6.7 and the Django CMS 3.0.8.

Note that I also need to add the line to the SlideFolderCMSPlugin class to get rid of the PluginAlreadyRegistered error from #24

TemplateSyntaxError at /en/ Invalid filter: 'shuffle'

Environment:

Request Method: GET
Request URL: http://api-international-stage.us-iad-rs.aldryn.io/en/

Django Version: 1.5.5
Python Version: 2.7.4
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'djangocms_admin_style',
u'django.contrib.admin',
u'django.contrib.staticfiles',
u'cms',
u'menus',
u'mptt',
u'south',
u'djangocms_text_ckeditor',
u'djangocms_link',
u'djangocms_snippet',
u'djangocms_googlemap',
u'raven.contrib.django',
u'sekizai',
u'gunicorn',
u'cmscloud',
u'compressor',
u'filer',
u'easy_thumbnails',
u'social_tags',
u'aldryn_social_sharing',
u'aldryn_video',
u'aldryn_grid_foundation',
u'aldryn_style',
u'djangocms_text_ckeditor',
u'filer',
u'aldryn_gallery',
'polymorphic',
'cmsplugin_filer_file',
'cmsplugin_filer_image',
'reversion',
'django_select2']
Installed Middleware:
[u'django.contrib.sessions.middleware.SessionMiddleware',
u'django.middleware.transaction.TransactionMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'cmscloud.middleware.AccessControlMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.middleware.http.ConditionalGetMiddleware',
u'cms.middleware.language.LanguageCookieMiddleware',
u'cms.middleware.user.CurrentUserMiddleware',
u'cms.middleware.page.CurrentPageMiddleware',
u'cms.middleware.toolbar.ToolbarMiddleware',
'cmscloud.middleware.CurrentSiteMiddleware']

Template error:
In template /app/templates/aldryn_gallery/plugins/feature/gallery.html, error at line 9
Invalid filter: 'shuffle'
1 : {% extends "aldryn_gallery/plugins/gallery.html" %}

2 : {% load i18n static thumbnail sekizai_tags cms_tags %}

3 :

4 : {% block gallery %}

5 :

6 :

previous

7 :

    8 : {% if instance.shuffle %}

    9 : {% for plugin in instance.child_plugin_instances|shuffle %}

    10 : {% render_plugin plugin %}

    11 : {% endfor %}

    12 : {% else %}

    13 : {% for plugin in instance.child_plugin_instances %}

    14 : {% render_plugin plugin %}

    15 : {% endfor %}

    16 : {% endif %}

    17 :

18 :

next

19 :

Traceback:
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = response.render()
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py" in render
  2.         self.content = self.rendered_content
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  3.     content = template.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  4.         return self._render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in _render
  5.     return self.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  6.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  7.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  8.     return compiled_parent._render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in _render
  9.     return self.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  10.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  11.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  12.     return compiled_parent._render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in _render
  13.     return self.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  14.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  15.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/classytags/core.py" in render
  16.     return self.render_tag(context, **kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
  17.     rendered_contents = nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  18.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  19.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/classytags/core.py" in render
  20.     return self.render_tag(context, **kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
  21.     rendered_contents = nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  22.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  23.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  24.         result = block.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  25.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  26.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  27.         result = block.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  28.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  29.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  30.         result = block.nodelist.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in render
  31.             bit = self.render_node(node, context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/debug.py" in render_node
  32.         return node.render(context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/classytags/core.py" in render
  33.     return self.render_tag(context, **kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
  34.     content = get_placeholder_content(context, request, page, name, inherit, nodelist)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in get_placeholder_content
  35.     content = render_placeholder(placeholder, context, name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_placeholder
  36. content.extend(render_plugins(plugins, context, placeholder, processors))
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_plugins
  37.     out.append(plugin.render_plugin(context, placeholder, processors=processors))
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/models/pluginmodel.py" in render_plugin
  38.         return render_plugin(context, instance, placeholder, template, processors, context.current_app)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_plugin
  39.     content = render_to_string(template, context_instance=context)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in render_to_string
  40.     t = get_template(template_name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in get_template
  41. template, origin = find_template(template_name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in find_template
  42.         source, display_name = loader(name, dirs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in call
  43.     return self.load_template(template_name, template_dirs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in load_template
  44.         template = get_template_from_string(source, origin, template_name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader.py" in get_template_from_string
  45. return Template(source, origin, name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in init
  46.     self.nodelist = compile_string(template_string, origin)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in compile_string
  47. return parser.parse()
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in parse
  48.                 compiled_result = compile_func(self, token)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in do_extends
  49. nodelist = parser.parse()
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in parse
  50.                 compiled_result = compile_func(self, token)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/loader_tags.py" in do_block
  51. nodelist = parser.parse(('endblock',))
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in parse
  52.                 compiled_result = compile_func(self, token)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/defaulttags.py" in do_if
  53. nodelist = parser.parse(('elif', 'else', 'endif'))
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in parse
  54.                 compiled_result = compile_func(self, token)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/defaulttags.py" in do_for
  55. sequence = parser.compile_filter(bits[in_index+1])
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in compile_filter
  56.     return FilterExpression(token, self)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in init
  57.             filter_func = parser.find_filter(filter_name)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/template/base.py" in find_filter
  58.         raise TemplateSyntaxError("Invalid filter: '%s'" % filter_name)
    

Exception Type: TemplateSyntaxError at /en/
Exception Value: Invalid filter: 'shuffle'

PluginAlreadyRegistered error

Hi

I get the error PluginAlreadyRegistered: Cannot register <class 'aldryn_gallery.cms_plugins.GalleryCMSPlugin'>, a plugin with this name ('GalleryCMSPlugin') is already registered. and just can't find out why. I got it working on another system but here I get the error and am clueless. Any idea?

Here is the full traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
    return self.application(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__
    self.load_middleware()
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 47, in load_middleware
    mw_instance = mw_class()
  File "/usr/local/lib/python2.7/dist-packages/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 365, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 360, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/var/www/secret/website/urls.py", line 9, in <module>
    admin.autodiscover()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 29, in autodiscover
    import_module('%s.admin' % app)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/cms/admin/__init__.py", line 11, in <module>
    plugin_pool.plugin_pool.discover_plugins()
  File "/usr/local/lib/python2.7/dist-packages/cms/plugin_pool.py", line 36, in discover_plugins
    load('cms_plugins')
  File "/usr/local/lib/python2.7/dist-packages/cms/utils/django_load.py", line 56, in load
    get_module(app, modname, verbose, failfast)
  File "/usr/local/lib/python2.7/dist-packages/cms/utils/django_load.py", line 40, in get_module
    module = import_module(module_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/aldryn_gallery/cms_plugins.py", line 95, in <module>
    plugin_pool.register_plugin(GalleryCMSPlugin)
  File "/usr/local/lib/python2.7/dist-packages/cms/plugin_pool.py", line 93, in register_plugin
    "registered." % (plugin, plugin_name)
PluginAlreadyRegistered: Cannot register <class 'aldryn_gallery.cms_plugins.GalleryCMSPlugin'>, a plugin with this name ('GalleryCMSPlugin') is already registered.

I've just tried to add this to a template and getting a recursion depth issue

I've created a simple template and added it to a page;

{% extends "base.html" %}
{% load cms_tags menu_tags cache %}

{% block title %}{% page_attribute 'title' %}{% endblock title %}
{% block content %}
    {% include "aldryn_gallery/plugins/standard/gallery.html" %}
{% endblock content %}

But when I add the plugin to the page I'm getting;

  File "/Users/mwalker/Sites/vmlm/lib/python2.7/site-packages/django/template/context.py", line 65, in has_key
    if key in d:
  File "/Users/mwalker/Sites/vmlm/lib/python2.7/site-packages/django/template/context.py", line 70, in __contains__
    return self.has_key(key)
  File "/Users/mwalker/Sites/vmlm/lib/python2.7/site-packages/django/template/context.py", line 65, in has_key
    if key in d:
RuntimeError: maximum recursion depth exceeded while calling a Python object

I only started working with django cms today, so is there some terribly basic mistake I'm making because I had this happen earlier when I was using the older cmsplugin_gallery.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.