Answer the question
In order to leave comments, you need to log in
How can I restore the Djando CMS plugin to work?
Hello, I decided to make a plug-in for Djando CMS the first time everything worked out fine, but after a while (I don’t remember what I did) it stopped working, and it works when I delete the model = Slider field
# _*_ coding: utf-8 _*_
__author__ = 'vitali'
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext as _
from .models import Slider
class SliderPlugin(CMSPluginBase):
module = _("Our Mega Plugins")
name = _("Slider Plugin")
render_template = "plugin/plugin.html"
# model = Slider
def render(self, context, instance, placeholder):
context.update({'instance': instance})
return context
plugin_pool.register_plugin(SliderPlugin)
class Slider (CMSPlugin): # Класс созданный для управления плагином
user_num = models.IntegerField(default=10)
def __unicode__(self):
return self.user_num
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question